archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libkface / trunk / libkface-opencv-3.2.patch
blob4476dcd416e9668cd7f96e7d5eaf5b5e6ccd3f5f
1 diff --git a/src/recognition-opencv-lbph/facerec_borrowed.cpp b/src/recognition-opencv-lbph/facerec_borrowed.cpp
2 index 3c37ce2..b21df1c 100644
3 --- a/src/recognition-opencv-lbph/facerec_borrowed.cpp
4 +++ b/src/recognition-opencv-lbph/facerec_borrowed.cpp
5 @@ -377,7 +377,7 @@ void LBPHFaceRecognizer::train(InputArrayOfArrays _in_src, InputArray _inm_label
9 -#if OPENCV_TEST_VERSION(3,1,0)
10 +#if OPENCV_TEST_VERSION(3,2,0)
11 void LBPHFaceRecognizer::predict(InputArray _src, int &minClass, double &minDist) const
12 #else
13 void LBPHFaceRecognizer::predict(cv::InputArray _src, cv::Ptr<cv::face::PredictCollector> collector, const int state) const
14 @@ -400,7 +400,7 @@ void LBPHFaceRecognizer::predict(cv::InputArray _src, cv::Ptr<cv::face::PredictC
15 m_grid_y, /* grid size y */
16 true /* normed histograms */
18 -#if OPENCV_TEST_VERSION(3,1,0)
19 +#if OPENCV_TEST_VERSION(3,2,0)
20 minDist = DBL_MAX;
21 minClass = -1;
22 #else
23 @@ -416,7 +416,7 @@ void LBPHFaceRecognizer::predict(cv::InputArray _src, cv::Ptr<cv::face::PredictC
25 double dist = compareHist(m_histograms[sampleIdx], query, CV_COMP_CHISQR);
27 -#if OPENCV_TEST_VERSION(3,1,0)
28 +#if OPENCV_TEST_VERSION(3,2,0)
29 if((dist < minDist) && (dist < m_threshold))
31 minDist = dist;
32 @@ -463,7 +463,7 @@ void LBPHFaceRecognizer::predict(cv::InputArray _src, cv::Ptr<cv::face::PredictC
33 double mean = sum / it->second.size();
34 s += QString::fromLatin1("%1: %2 - ").arg(it->first).arg(mean);
36 -#if OPENCV_TEST_VERSION(3,1,0)
37 +#if OPENCV_TEST_VERSION(3,2,0)
38 if((mean < minDist) && (mean < m_threshold))
40 minDist = mean;
41 @@ -505,7 +505,7 @@ void LBPHFaceRecognizer::predict(cv::InputArray _src, cv::Ptr<cv::face::PredictC
42 scoreMap[it->second]++;
45 -#if OPENCV_TEST_VERSION(3,1,0)
46 +#if OPENCV_TEST_VERSION(3,2,0)
47 minDist = 0;
48 #endif
49 QString s = QString::fromLatin1("Nearest Neighbor score: ");
50 @@ -515,7 +515,7 @@ void LBPHFaceRecognizer::predict(cv::InputArray _src, cv::Ptr<cv::face::PredictC
51 double score = double(it->second) / countMap.at(it->first);
52 s += QString::fromLatin1("%1/%2 %3 ").arg(it->second).arg(countMap.at(it->first)).arg(score);
54 -#if OPENCV_TEST_VERSION(3,1,0)
55 +#if OPENCV_TEST_VERSION(3,2,0)
56 if (score > minDist)
58 minDist = score;
59 @@ -534,7 +534,7 @@ void LBPHFaceRecognizer::predict(cv::InputArray _src, cv::Ptr<cv::face::PredictC
63 -#if OPENCV_TEST_VERSION(3,1,0)
64 +#if OPENCV_TEST_VERSION(3,2,0)
65 int LBPHFaceRecognizer::predict(InputArray _src) const
67 int label;
68 diff --git a/src/recognition-opencv-lbph/facerec_borrowed.h b/src/recognition-opencv-lbph/facerec_borrowed.h
69 index f197d22..0f13d55 100644
70 --- a/src/recognition-opencv-lbph/facerec_borrowed.h
71 +++ b/src/recognition-opencv-lbph/facerec_borrowed.h
72 @@ -126,7 +126,7 @@ public:
73 void update(cv::InputArrayOfArrays src, cv::InputArray labels);
76 -#if OPENCV_TEST_VERSION(3,1,0)
77 +#if OPENCV_TEST_VERSION(3,2,0)
78 /**
79 * Predicts the label of a query image in src.