diff --git a/modules/face/include/opencv2/face.hpp b/modules/face/include/opencv2/face.hpp index 388bc3196ac..ec706beed84 100644 --- a/modules/face/include/opencv2/face.hpp +++ b/modules/face/include/opencv2/face.hpp @@ -162,7 +162,7 @@ class CV_EXPORTS_W FaceRecognizer : public Algorithm @param src The training images, that means the faces you want to learn. The data has to be given as a vector\. @param labels The labels corresponding to the images have to be given either as a vector\ - or a + or a Mat of type CV_32SC1. The following source code snippet shows you how to learn a Fisherfaces model on a given set of images. The images are read with imread and pushed into a std::vector\. The labels of each @@ -175,6 +175,8 @@ class CV_EXPORTS_W FaceRecognizer : public Algorithm // holds images and labels vector images; vector labels; + // using Mat of type CV_32SC1 + // Mat labels(number_of_samples, 1, CV_32SC1); // images for first person images.push_back(imread("person0/0.jpg", IMREAD_GRAYSCALE)); labels.push_back(0); images.push_back(imread("person0/1.jpg", IMREAD_GRAYSCALE)); labels.push_back(0); @@ -211,7 +213,7 @@ class CV_EXPORTS_W FaceRecognizer : public Algorithm @param src The training images, that means the faces you want to learn. The data has to be given as a vector\. @param labels The labels corresponding to the images have to be given either as a vector\ or - a + a Mat of type CV_32SC1. This method updates a (probably trained) FaceRecognizer, but only if the algorithm supports it. The Local Binary Patterns Histograms (LBPH) recognizer (see createLBPHFaceRecognizer) can be updated. diff --git a/modules/sfm/src/libmv_light/libmv/base/CMakeLists.txt b/modules/sfm/src/libmv_light/libmv/base/CMakeLists.txt deleted file mode 100644 index 5c54b13649e..00000000000 --- a/modules/sfm/src/libmv_light/libmv/base/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# define the source files -SET(BASE_SRC ) - -# define the header files (make the headers appear in IDEs.) -FILE(GLOB BASE_HDRS *.h) - -ADD_LIBRARY(base STATIC ${BASE_SRC} ${BASE_HDRS}) - -LIBMV_INSTALL_LIB(base) \ No newline at end of file diff --git a/modules/sfm/src/libmv_light/libmv/correspondence/CMakeLists.txt b/modules/sfm/src/libmv_light/libmv/correspondence/CMakeLists.txt index 5aac7bab6fc..058ddceb58f 100644 --- a/modules/sfm/src/libmv_light/libmv/correspondence/CMakeLists.txt +++ b/modules/sfm/src/libmv_light/libmv/correspondence/CMakeLists.txt @@ -8,6 +8,10 @@ FILE(GLOB CORRESPONDENCE_HDRS *.h) ADD_LIBRARY(correspondence STATIC ${CORRESPONDENCE_SRC} ${CORRESPONDENCE_HDRS}) -TARGET_LINK_LIBRARIES(correspondence multiview) +TARGET_LINK_LIBRARIES(correspondence LINK_PRIVATE multiview) +IF(TARGET Eigen3::Eigen) + TARGET_LINK_LIBRARIES(correspondence LINK_PUBLIC Eigen3::Eigen) +ENDIF() -LIBMV_INSTALL_LIB(correspondence) \ No newline at end of file + +LIBMV_INSTALL_LIB(correspondence) diff --git a/modules/sfm/src/libmv_light/libmv/multiview/CMakeLists.txt b/modules/sfm/src/libmv_light/libmv/multiview/CMakeLists.txt index b99ffbe0a7b..5b4b40b95e2 100644 --- a/modules/sfm/src/libmv_light/libmv/multiview/CMakeLists.txt +++ b/modules/sfm/src/libmv_light/libmv/multiview/CMakeLists.txt @@ -17,6 +17,9 @@ SET(MULTIVIEW_SRC conditioning.cc FILE(GLOB MULTIVIEW_HDRS *.h) ADD_LIBRARY(multiview STATIC ${MULTIVIEW_SRC} ${MULTIVIEW_HDRS}) -TARGET_LINK_LIBRARIES(multiview ${GLOG_LIBRARY} numeric) +TARGET_LINK_LIBRARIES(multiview LINK_PRIVATE ${GLOG_LIBRARY} numeric) +IF(TARGET Eigen3::Eigen) + TARGET_LINK_LIBRARIES(multiview LINK_PUBLIC Eigen3::Eigen) +ENDIF() LIBMV_INSTALL_LIB(multiview) diff --git a/modules/sfm/src/libmv_light/libmv/numeric/CMakeLists.txt b/modules/sfm/src/libmv_light/libmv/numeric/CMakeLists.txt index 5ecd541ccee..3de2f2fda4b 100644 --- a/modules/sfm/src/libmv_light/libmv/numeric/CMakeLists.txt +++ b/modules/sfm/src/libmv_light/libmv/numeric/CMakeLists.txt @@ -7,6 +7,8 @@ FILE(GLOB NUMERIC_HDRS *.h) ADD_LIBRARY(numeric STATIC ${NUMERIC_SRC} ${NUMERIC_HDRS}) -TARGET_LINK_LIBRARIES(numeric) +IF(TARGET Eigen3::Eigen) + TARGET_LINK_LIBRARIES(numeric LINK_PUBLIC Eigen3::Eigen) +ENDIF() -LIBMV_INSTALL_LIB(numeric) \ No newline at end of file +LIBMV_INSTALL_LIB(numeric) diff --git a/modules/sfm/src/libmv_light/libmv/simple_pipeline/CMakeLists.txt b/modules/sfm/src/libmv_light/libmv/simple_pipeline/CMakeLists.txt index 42e37919800..9426e290144 100644 --- a/modules/sfm/src/libmv_light/libmv/simple_pipeline/CMakeLists.txt +++ b/modules/sfm/src/libmv_light/libmv/simple_pipeline/CMakeLists.txt @@ -17,6 +17,6 @@ FILE(GLOB SIMPLE_PIPELINE_HDRS *.h) ADD_LIBRARY(simple_pipeline STATIC ${SIMPLE_PIPELINE_SRC} ${SIMPLE_PIPELINE_HDRS}) -TARGET_LINK_LIBRARIES(simple_pipeline multiview ${CERES_LIBRARIES}) +TARGET_LINK_LIBRARIES(simple_pipeline LINK_PRIVATE multiview ${CERES_LIBRARIES}) -LIBMV_INSTALL_LIB(simple_pipeline) \ No newline at end of file +LIBMV_INSTALL_LIB(simple_pipeline) diff --git a/modules/ximgproc/samples/fld_lines.cpp b/modules/ximgproc/samples/fld_lines.cpp index 1bcfaf76684..62a2d48cb39 100644 --- a/modules/ximgproc/samples/fld_lines.cpp +++ b/modules/ximgproc/samples/fld_lines.cpp @@ -27,10 +27,6 @@ int main(int argc, char** argv) return -1; } - // Create LSD detector - Ptr lsd = createLineSegmentDetector(); - vector lines_lsd; - // Create FLD detector // Param Default value Description // length_threshold 10 - Segments shorter than this will be discarded @@ -57,29 +53,18 @@ int main(int argc, char** argv) vector lines_fld; // Because of some CPU's power strategy, it seems that the first running of - // an algorithm takes much longer. So here we run both of the algorithmes 10 - // times to see each algorithm's processing time with sufficiently warmed-up + // an algorithm takes much longer. So here we run the algorithm 10 times + // to see the algorithm's processing time with sufficiently warmed-up // CPU performance. for(int run_count = 0; run_count < 10; run_count++) { - lines_lsd.clear(); - int64 start_lsd = getTickCount(); - lsd->detect(image, lines_lsd); - // Detect the lines with LSD double freq = getTickFrequency(); - double duration_ms_lsd = double(getTickCount() - start_lsd) * 1000 / freq; - std::cout << "Elapsed time for LSD: " << duration_ms_lsd << " ms." << std::endl; - lines_fld.clear(); int64 start = getTickCount(); // Detect the lines with FLD fld->detect(image, lines_fld); double duration_ms = double(getTickCount() - start) * 1000 / freq; - std::cout << "Ealpsed time for FLD " << duration_ms << " ms." << std::endl; + std::cout << "Elapsed time for FLD " << duration_ms << " ms." << std::endl; } - // Show found lines with LSD - Mat line_image_lsd(image); - lsd->drawSegments(line_image_lsd, lines_lsd); - imshow("LSD result", line_image_lsd); // Show found lines with FLD Mat line_image_fld(image);