github

            https://github.com/stefanbo92/color-detector


 依赖

            3.0之前版本的OpenCV,使用到分类器CvSVM


存在多个版本OpenCV,指定OpenCV的编译路径

修改CMakeLists.txt文件

cmake_minimum_required(VERSION 2.8)

project( testApp )

set(OpenCV_DIR  /home/dong/opencv-2.4.9/build)//指定OpenCV编译库路径
find_package(OpenCV REQUIRED)

add_executable( test test.cpp )
target_link_libraries( test ${OpenCV_LIBS} )

add_executable( train train.cpp )
target_link_libraries( train ${OpenCV_LIBS} )