githubgit
https://github.com/stefanbo92/color-detectorgithub
依賴app
3.0以前版本的OpenCV,使用到分類器CvSVMide
存在多個版本OpenCV,指定OpenCV的編譯路徑ui
修改CMakeLists.txt文件spa
cmake_minimum_required(VERSION 2.8)orm
project( testApp )
ci
set(OpenCV_DIR /home/dong/opencv-2.4.9/build)//指定OpenCV編譯庫路徑
find_package(OpenCV REQUIRED)get
add_executable( test test.cpp )
target_link_libraries( test ${OpenCV_LIBS} )it
add_executable( train train.cpp )target_link_libraries( train ${OpenCV_LIBS} )