Commit f0d7222ba5a014adb8c8bb38d55cea27fb1819bf
1 parent
0602f79c
decreased the required set of opencv libraries
Showing
3 changed files
with
55 additions
and
2 deletions
CMakeLists.txt
| @@ -86,7 +86,7 @@ set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${Qt5Core_QTMAIN_LIBRARIES}) | @@ -86,7 +86,7 @@ set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${Qt5Core_QTMAIN_LIBRARIES}) | ||
| 86 | 86 | ||
| 87 | # Find OpenCV | 87 | # Find OpenCV |
| 88 | find_package(OpenCV 2.4.5 REQUIRED) | 88 | find_package(OpenCV 2.4.5 REQUIRED) |
| 89 | -set(OPENCV_DEPENDENCIES opencv_core opencv_features2d opencv_flann opencv_highgui opencv_imgproc opencv_ml opencv_nonfree opencv_objdetect opencv_photo opencv_video opencv_contrib) | 89 | +set(OPENCV_DEPENDENCIES opencv_core opencv_highgui opencv_imgproc opencv_ml opencv_objdetect) |
| 90 | set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${OPENCV_DEPENDENCIES}) | 90 | set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${OPENCV_DEPENDENCIES}) |
| 91 | 91 | ||
| 92 | # Find Alphanum | 92 | # Find Alphanum |
openbr/plugins/cmake/opencv.cmake
0 → 100644
| 1 | +option(BR_WITH_OPENCV_CONTRIB "Build with OpenCV contrib plugins." ON) | ||
| 2 | +if(${BR_WITH_OPENCV_CONTRIB}) | ||
| 3 | + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} opencv_contrib) | ||
| 4 | + set(OPENCV_DEPENDENCIES ${OPENCV_DEPENDENCIES} opencv_contrib) | ||
| 5 | +else() | ||
| 6 | + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/imgproc/heatmap.cpp | ||
| 7 | + plugins/imgproc/shapeaxisratio.cpp) | ||
| 8 | +endif() | ||
| 9 | + | ||
| 10 | +option(BR_WITH_OPENCV_FEATURES2D "Build with OpenCV features2d plugins." ON) | ||
| 11 | +if(${BR_WITH_OPENCV_FEATURES2D}) | ||
| 12 | + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} opencv_features2d) | ||
| 13 | + set(OPENCV_DEPENDENCIES ${OPENCV_DEPENDENCIES} opencv_features2d) | ||
| 14 | +else() | ||
| 15 | + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/distance/keypointmatcher.cpp | ||
| 16 | + plugins/imgproc/keypointdescriptor.cpp | ||
| 17 | + plugins/metadata/keypointdetector.cpp) | ||
| 18 | +endif() | ||
| 19 | + | ||
| 20 | +option(BR_WITH_OPENCV_FLANN "Build with OpenCV flann plugins." ON) | ||
| 21 | +if(${BR_WITH_OPENCV_FLANN}) | ||
| 22 | + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} opencv_flann) | ||
| 23 | + set(OPENCV_DEPENDENCIES ${OPENCV_DEPENDENCIES} opencv_flann) | ||
| 24 | +else() | ||
| 25 | + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/cluster/kmeans.cpp | ||
| 26 | + plugins/cluster/randomcentroids.cpp) | ||
| 27 | +endif() | ||
| 28 | + | ||
| 29 | +option(BR_WITH_OPENCV_NONFREE "Build with OpenCV nonfree plugins." ON) | ||
| 30 | +if(${BR_WITH_OPENCV_NONFREE}) | ||
| 31 | + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} opencv_nonfree) | ||
| 32 | + set(OPENCV_DEPENDENCIES ${OPENCV_DEPENDENCIES} opencv_nonfree) | ||
| 33 | +else() | ||
| 34 | + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/imgproc/custom_sift.cpp | ||
| 35 | + plugins/imgproc/sift.cpp) | ||
| 36 | +endif() | ||
| 37 | + | ||
| 38 | +option(BR_WITH_OPENCV_PHOTO "Build with OpenCV photo plugins." ON) | ||
| 39 | +if(${BR_WITH_OPENCV_PHOTO}) | ||
| 40 | + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} opencv_photo) | ||
| 41 | + set(OPENCV_DEPENDENCIES ${OPENCV_DEPENDENCIES} opencv_photo) | ||
| 42 | +else() | ||
| 43 | + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/imgproc/denoising.cpp | ||
| 44 | + plugins/imgproc/inpaint.cpp) | ||
| 45 | +endif() | ||
| 46 | + | ||
| 47 | +option(BR_WITH_OPENCV_VIDEO "Build with OpenCV video plugins." ON) | ||
| 48 | +if(${BR_WITH_OPENCV_VIDEO}) | ||
| 49 | + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} opencv_video) | ||
| 50 | + set(OPENCV_DEPENDENCIES ${OPENCV_DEPENDENCIES} opencv_video) | ||
| 51 | +else() | ||
| 52 | + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/imgproc/opticalflow.cpp) | ||
| 53 | +endif() |
openbr/plugins/imgproc/custom_sift.cpp
| @@ -105,7 +105,7 @@ | @@ -105,7 +105,7 @@ | ||
| 105 | #include <iostream> | 105 | #include <iostream> |
| 106 | #include <stdarg.h> | 106 | #include <stdarg.h> |
| 107 | #include <opencv2/imgproc/imgproc.hpp> | 107 | #include <opencv2/imgproc/imgproc.hpp> |
| 108 | -#include <opencv2/nonfree/features2d.hpp> | 108 | +#include <opencv2/nonfree/nonfree.hpp> |
| 109 | 109 | ||
| 110 | using namespace cv; | 110 | using namespace cv; |
| 111 | 111 |