Skip to content

Commit d712740

Browse files
committed
remove redundancy opencv libs in samples
1 parent 9852e80 commit d712740

File tree

6 files changed

+5
-9
lines changed

6 files changed

+5
-9
lines changed

modules/cnn_3dobj/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $ sudo make install
3030
$ cd <opencv_source_directory>
3131
$ mkdir build
3232
$ cd build
33-
$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=OFF -D WITH_V4L=ON -D WITH_QT=OFF -D WITH_OPENGL=ON -D WITH_VTK=ON -D INSTALL_TESTS=ON -D OPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules ..
33+
$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=OFF -D WITH_OPENGL=ON -D WITH_VTK=ON -D INSTALL_TESTS=ON -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules ..
3434
$ make -j4
3535
$ sudo make install
3636
```

modules/cnn_3dobj/samples/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ find_package(OpenCV REQUIRED)
66
set(SOURCES_generator demo_sphereview_data.cpp)
77
include_directories(${OpenCV_INCLUDE_DIRS})
88
add_executable(sphereview_test ${SOURCES_generator})
9-
target_link_libraries(sphereview_test ${OpenCV_LIBS})
9+
target_link_libraries(sphereview_test opencv_core opencv_imgproc opencv_highgui opencv_cnn_3dobj opencv_xfeatures2d)
1010

1111
set(SOURCES_classifier demo_classify.cpp)
1212
add_executable(classify_test ${SOURCES_classifier})
13-
target_link_libraries(classify_test ${OpenCV_LIBS})
13+
target_link_libraries(classify_test opencv_core opencv_imgproc opencv_highgui opencv_cnn_3dobj opencv_xfeatures2d)
1414

1515
set(SOURCES_modelanalysis demo_model_analysis.cpp)
1616
add_executable(model_test ${SOURCES_modelanalysis})
17-
target_link_libraries(model_test ${OpenCV_LIBS})
17+
target_link_libraries(model_test opencv_core opencv_imgproc opencv_highgui opencv_cnn_3dobj opencv_xfeatures2d)
1818

1919
set(SOURCES_video demo_video.cpp)
2020
add_executable(video_test ${SOURCES_video})
21-
target_link_libraries(video_test ${OpenCV_LIBS})
21+
target_link_libraries(video_test opencv_core opencv_imgproc opencv_highgui opencv_cnn_3dobj opencv_xfeatures2d)

modules/cnn_3dobj/samples/demo_classify.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
* @brief Feature extraction and classification.
3838
* @author Yida Wang
3939
*/
40-
#define HAVE_CAFFE
4140
#include <opencv2/cnn_3dobj.hpp>
4241
#include <opencv2/features2d/features2d.hpp>
4342
#include <iomanip>

modules/cnn_3dobj/samples/demo_model_analysis.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
* @brief Generating training data for CNN with triplet loss.
3838
* @author Yida Wang
3939
*/
40-
#define HAVE_CAFFE
4140
#include <iostream>
4241
#include "opencv2/imgproc.hpp"
4342
#include "opencv2/cnn_3dobj.hpp"

modules/cnn_3dobj/samples/demo_sphereview_data.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
* @brief Generating training data for CNN with triplet loss.
3838
* @author Yida Wang
3939
*/
40-
#define HAVE_CAFFE
4140
#include <opencv2/cnn_3dobj.hpp>
4241
#include <opencv2/viz/vizcore.hpp>
4342
#include <iostream>

modules/cnn_3dobj/samples/demo_video.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include <opencv2/calib3d/calib3d.hpp>
33
#include <iostream>
44
#include <fstream>
5-
#define HAVE_CAFFE
65
#include <opencv2/cnn_3dobj.hpp>
76
#include <opencv2/features2d/features2d.hpp>
87
#include <iomanip>

0 commit comments

Comments
 (0)