Skip to content

Commit 2465def

Browse files
committed
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2 parents 24cd5e2 + 9005e9e commit 2465def

File tree

7 files changed

+23
-36
lines changed

7 files changed

+23
-36
lines changed

modules/face/include/opencv2/face.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class CV_EXPORTS_W FaceRecognizer : public Algorithm
162162
@param src The training images, that means the faces you want to learn. The data has to be
163163
given as a vector\<Mat\>.
164164
@param labels The labels corresponding to the images have to be given either as a vector\<int\>
165-
or a
165+
or a Mat of type CV_32SC1.
166166
167167
The following source code snippet shows you how to learn a Fisherfaces model on a given set of
168168
images. The images are read with imread and pushed into a std::vector\<Mat\>. The labels of each
@@ -175,6 +175,8 @@ class CV_EXPORTS_W FaceRecognizer : public Algorithm
175175
// holds images and labels
176176
vector<Mat> images;
177177
vector<int> labels;
178+
// using Mat of type CV_32SC1
179+
// Mat labels(number_of_samples, 1, CV_32SC1);
178180
// images for first person
179181
images.push_back(imread("person0/0.jpg", IMREAD_GRAYSCALE)); labels.push_back(0);
180182
images.push_back(imread("person0/1.jpg", IMREAD_GRAYSCALE)); labels.push_back(0);
@@ -211,7 +213,7 @@ class CV_EXPORTS_W FaceRecognizer : public Algorithm
211213
@param src The training images, that means the faces you want to learn. The data has to be given
212214
as a vector\<Mat\>.
213215
@param labels The labels corresponding to the images have to be given either as a vector\<int\> or
214-
a
216+
a Mat of type CV_32SC1.
215217
216218
This method updates a (probably trained) FaceRecognizer, but only if the algorithm supports it. The
217219
Local Binary Patterns Histograms (LBPH) recognizer (see createLBPHFaceRecognizer) can be updated.

modules/sfm/src/libmv_light/libmv/base/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

modules/sfm/src/libmv_light/libmv/correspondence/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ FILE(GLOB CORRESPONDENCE_HDRS *.h)
88

99
ADD_LIBRARY(correspondence STATIC ${CORRESPONDENCE_SRC} ${CORRESPONDENCE_HDRS})
1010

11-
TARGET_LINK_LIBRARIES(correspondence multiview)
11+
TARGET_LINK_LIBRARIES(correspondence LINK_PRIVATE multiview)
12+
IF(TARGET Eigen3::Eigen)
13+
TARGET_LINK_LIBRARIES(correspondence LINK_PUBLIC Eigen3::Eigen)
14+
ENDIF()
1215

13-
LIBMV_INSTALL_LIB(correspondence)
16+
17+
LIBMV_INSTALL_LIB(correspondence)

modules/sfm/src/libmv_light/libmv/multiview/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ SET(MULTIVIEW_SRC conditioning.cc
1717
FILE(GLOB MULTIVIEW_HDRS *.h)
1818

1919
ADD_LIBRARY(multiview STATIC ${MULTIVIEW_SRC} ${MULTIVIEW_HDRS})
20-
TARGET_LINK_LIBRARIES(multiview ${GLOG_LIBRARY} numeric)
20+
TARGET_LINK_LIBRARIES(multiview LINK_PRIVATE ${GLOG_LIBRARY} numeric)
21+
IF(TARGET Eigen3::Eigen)
22+
TARGET_LINK_LIBRARIES(multiview LINK_PUBLIC Eigen3::Eigen)
23+
ENDIF()
2124

2225
LIBMV_INSTALL_LIB(multiview)

modules/sfm/src/libmv_light/libmv/numeric/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ FILE(GLOB NUMERIC_HDRS *.h)
77

88
ADD_LIBRARY(numeric STATIC ${NUMERIC_SRC} ${NUMERIC_HDRS})
99

10-
TARGET_LINK_LIBRARIES(numeric)
10+
IF(TARGET Eigen3::Eigen)
11+
TARGET_LINK_LIBRARIES(numeric LINK_PUBLIC Eigen3::Eigen)
12+
ENDIF()
1113

12-
LIBMV_INSTALL_LIB(numeric)
14+
LIBMV_INSTALL_LIB(numeric)

modules/sfm/src/libmv_light/libmv/simple_pipeline/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ FILE(GLOB SIMPLE_PIPELINE_HDRS *.h)
1717

1818
ADD_LIBRARY(simple_pipeline STATIC ${SIMPLE_PIPELINE_SRC} ${SIMPLE_PIPELINE_HDRS})
1919

20-
TARGET_LINK_LIBRARIES(simple_pipeline multiview ${CERES_LIBRARIES})
20+
TARGET_LINK_LIBRARIES(simple_pipeline LINK_PRIVATE multiview ${CERES_LIBRARIES})
2121

22-
LIBMV_INSTALL_LIB(simple_pipeline)
22+
LIBMV_INSTALL_LIB(simple_pipeline)

modules/ximgproc/samples/fld_lines.cpp

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ int main(int argc, char** argv)
2727
return -1;
2828
}
2929

30-
// Create LSD detector
31-
Ptr<LineSegmentDetector> lsd = createLineSegmentDetector();
32-
vector<Vec4f> lines_lsd;
33-
3430
// Create FLD detector
3531
// Param Default value Description
3632
// length_threshold 10 - Segments shorter than this will be discarded
@@ -57,29 +53,18 @@ int main(int argc, char** argv)
5753
vector<Vec4f> lines_fld;
5854

5955
// Because of some CPU's power strategy, it seems that the first running of
60-
// an algorithm takes much longer. So here we run both of the algorithmes 10
61-
// times to see each algorithm's processing time with sufficiently warmed-up
56+
// an algorithm takes much longer. So here we run the algorithm 10 times
57+
// to see the algorithm's processing time with sufficiently warmed-up
6258
// CPU performance.
6359
for(int run_count = 0; run_count < 10; run_count++) {
64-
lines_lsd.clear();
65-
int64 start_lsd = getTickCount();
66-
lsd->detect(image, lines_lsd);
67-
// Detect the lines with LSD
6860
double freq = getTickFrequency();
69-
double duration_ms_lsd = double(getTickCount() - start_lsd) * 1000 / freq;
70-
std::cout << "Elapsed time for LSD: " << duration_ms_lsd << " ms." << std::endl;
71-
7261
lines_fld.clear();
7362
int64 start = getTickCount();
7463
// Detect the lines with FLD
7564
fld->detect(image, lines_fld);
7665
double duration_ms = double(getTickCount() - start) * 1000 / freq;
77-
std::cout << "Ealpsed time for FLD " << duration_ms << " ms." << std::endl;
66+
std::cout << "Elapsed time for FLD " << duration_ms << " ms." << std::endl;
7867
}
79-
// Show found lines with LSD
80-
Mat line_image_lsd(image);
81-
lsd->drawSegments(line_image_lsd, lines_lsd);
82-
imshow("LSD result", line_image_lsd);
8368

8469
// Show found lines with FLD
8570
Mat line_image_fld(image);

0 commit comments

Comments
 (0)