blob: 055f9be3acd1db37cc3bb9c251ce2412b78b1e77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
commit 1dad795deb0fbfcef5ad4932f7ade781d35ce17e
Author: Maik Qualmann <metzpinguin@gmail.com>
Date: Wed Nov 23 19:37:46 2016 +0100
fix not found shapepredictor.dat file
BUGS: 372831
FIXED-IN: 5.4.0
diff --git a/libs/dimg/filters/redeye/redeyecorrectionfilter.cpp b/libs/dimg/filters/redeye/redeyecorrectionfilter.cpp
index 1cbaefc..a834208 100644
--- a/libs/dimg/filters/redeye/redeyecorrectionfilter.cpp
+++ b/libs/dimg/filters/redeye/redeyecorrectionfilter.cpp
@@ -99,14 +99,14 @@ RedEyeCorrectionFilter::~RedEyeCorrectionFilter()
void RedEyeCorrectionFilter::filterImage()
{
- if (d->sp == 0)
+ if (!d->sp)
{
// Loading the shape predictor model
- QList<QString> path = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
- QString::fromLatin1("digikam/facesengine"),
- QStandardPaths::LocateDirectory);
- QFile model(*path.begin() + QLatin1String("/ShapePredictor.dat"));
+ QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
+ QLatin1String("digikam/facesengine/shapepredictor.dat"));
+
+ QFile model(path);
if (model.open(QIODevice::ReadOnly))
{
@@ -116,6 +116,10 @@ void RedEyeCorrectionFilter::filterImage()
dataStream >> *temp;
d->sp = temp;
}
+ else
+ {
+ return;
+ }
}
cv::Mat intermediateImage;
|