remove redundancy opencv libs in samples

pull/276/head
Wangyida 9 years ago
parent 9852e8096e
commit d712740ea1
  1. 2
      modules/cnn_3dobj/README.md
  2. 8
      modules/cnn_3dobj/samples/CMakeLists.txt
  3. 1
      modules/cnn_3dobj/samples/demo_classify.cpp
  4. 1
      modules/cnn_3dobj/samples/demo_model_analysis.cpp
  5. 1
      modules/cnn_3dobj/samples/demo_sphereview_data.cpp
  6. 1
      modules/cnn_3dobj/samples/demo_video.cpp

@ -30,7 +30,7 @@ $ sudo make install
$ cd <opencv_source_directory> $ cd <opencv_source_directory>
$ mkdir build $ mkdir build
$ cd build $ cd build
$ 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 .. $ 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 ..
$ make -j4 $ make -j4
$ sudo make install $ sudo make install
``` ```

@ -6,16 +6,16 @@ find_package(OpenCV REQUIRED)
set(SOURCES_generator demo_sphereview_data.cpp) set(SOURCES_generator demo_sphereview_data.cpp)
include_directories(${OpenCV_INCLUDE_DIRS}) include_directories(${OpenCV_INCLUDE_DIRS})
add_executable(sphereview_test ${SOURCES_generator}) add_executable(sphereview_test ${SOURCES_generator})
target_link_libraries(sphereview_test ${OpenCV_LIBS}) target_link_libraries(sphereview_test opencv_core opencv_imgproc opencv_highgui opencv_cnn_3dobj opencv_xfeatures2d)
set(SOURCES_classifier demo_classify.cpp) set(SOURCES_classifier demo_classify.cpp)
add_executable(classify_test ${SOURCES_classifier}) add_executable(classify_test ${SOURCES_classifier})
target_link_libraries(classify_test ${OpenCV_LIBS}) target_link_libraries(classify_test opencv_core opencv_imgproc opencv_highgui opencv_cnn_3dobj opencv_xfeatures2d)
set(SOURCES_modelanalysis demo_model_analysis.cpp) set(SOURCES_modelanalysis demo_model_analysis.cpp)
add_executable(model_test ${SOURCES_modelanalysis}) add_executable(model_test ${SOURCES_modelanalysis})
target_link_libraries(model_test ${OpenCV_LIBS}) target_link_libraries(model_test opencv_core opencv_imgproc opencv_highgui opencv_cnn_3dobj opencv_xfeatures2d)
set(SOURCES_video demo_video.cpp) set(SOURCES_video demo_video.cpp)
add_executable(video_test ${SOURCES_video}) add_executable(video_test ${SOURCES_video})
target_link_libraries(video_test ${OpenCV_LIBS}) target_link_libraries(video_test opencv_core opencv_imgproc opencv_highgui opencv_cnn_3dobj opencv_xfeatures2d)

@ -37,7 +37,6 @@
* @brief Feature extraction and classification. * @brief Feature extraction and classification.
* @author Yida Wang * @author Yida Wang
*/ */
#define HAVE_CAFFE
#include <opencv2/cnn_3dobj.hpp> #include <opencv2/cnn_3dobj.hpp>
#include <opencv2/features2d/features2d.hpp> #include <opencv2/features2d/features2d.hpp>
#include <iomanip> #include <iomanip>

@ -37,7 +37,6 @@
* @brief Generating training data for CNN with triplet loss. * @brief Generating training data for CNN with triplet loss.
* @author Yida Wang * @author Yida Wang
*/ */
#define HAVE_CAFFE
#include <iostream> #include <iostream>
#include "opencv2/imgproc.hpp" #include "opencv2/imgproc.hpp"
#include "opencv2/cnn_3dobj.hpp" #include "opencv2/cnn_3dobj.hpp"

@ -37,7 +37,6 @@
* @brief Generating training data for CNN with triplet loss. * @brief Generating training data for CNN with triplet loss.
* @author Yida Wang * @author Yida Wang
*/ */
#define HAVE_CAFFE
#include <opencv2/cnn_3dobj.hpp> #include <opencv2/cnn_3dobj.hpp>
#include <opencv2/viz/vizcore.hpp> #include <opencv2/viz/vizcore.hpp>
#include <iostream> #include <iostream>

@ -2,7 +2,6 @@
#include <opencv2/calib3d/calib3d.hpp> #include <opencv2/calib3d/calib3d.hpp>
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#define HAVE_CAFFE
#include <opencv2/cnn_3dobj.hpp> #include <opencv2/cnn_3dobj.hpp>
#include <opencv2/features2d/features2d.hpp> #include <opencv2/features2d/features2d.hpp>
#include <iomanip> #include <iomanip>

Loading…
Cancel
Save