2012-02-03 12:26:49 +01:00
|
|
|
SET(OPENCV_TRAINCASCADE_DEPS opencv_core opencv_ml opencv_imgproc opencv_objdetect opencv_highgui opencv_calib3d opencv_video opencv_features2d opencv_flann opencv_legacy)
|
|
|
|
ocv_check_dependencies(${OPENCV_TRAINCASCADE_DEPS})
|
|
|
|
|
|
|
|
if(NOT OCV_DEPENDENCIES_FOUND)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
project(traincascade)
|
|
|
|
|
2012-03-03 16:49:23 +01:00
|
|
|
ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" "${OpenCV_SOURCE_DIR}/include/opencv")
|
2012-02-03 12:26:49 +01:00
|
|
|
ocv_include_modules(${OPENCV_TRAINCASCADE_DEPS})
|
|
|
|
|
|
|
|
set(traincascade_files traincascade.cpp
|
|
|
|
cascadeclassifier.cpp cascadeclassifier.h
|
|
|
|
boost.cpp boost.h features.cpp traincascade_features.h
|
|
|
|
haarfeatures.cpp haarfeatures.h
|
|
|
|
lbpfeatures.cpp lbpfeatures.h
|
|
|
|
HOGfeatures.cpp HOGfeatures.h
|
|
|
|
imagestorage.cpp imagestorage.h)
|
|
|
|
|
2012-10-17 01:18:30 +02:00
|
|
|
set(the_target opencv_traincascade)
|
2012-02-03 12:26:49 +01:00
|
|
|
add_executable(${the_target} ${traincascade_files})
|
|
|
|
target_link_libraries(${the_target} ${OPENCV_TRAINCASCADE_DEPS} opencv_haartraining_engine)
|
|
|
|
|
|
|
|
set_target_properties(${the_target} PROPERTIES
|
|
|
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
|
|
|
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
|
|
|
|
OUTPUT_NAME "opencv_traincascade")
|
2012-10-17 01:18:30 +02:00
|
|
|
|
2012-02-03 12:26:49 +01:00
|
|
|
if(ENABLE_SOLUTION_FOLDERS)
|
|
|
|
set_target_properties(${the_target} PROPERTIES FOLDER "applications")
|
2012-10-17 01:18:30 +02:00
|
|
|
endif()
|
2012-02-03 12:26:49 +01:00
|
|
|
|
2013-08-07 10:53:48 +02:00
|
|
|
if(INSTALL_CREATE_DISTRIB)
|
|
|
|
if(BUILD_SHARED_LIBS)
|
2014-01-17 13:30:31 +01:00
|
|
|
install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT dev)
|
2013-08-07 10:53:48 +02:00
|
|
|
endif()
|
|
|
|
else()
|
2014-01-17 13:30:31 +01:00
|
|
|
install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT dev)
|
2013-08-07 10:53:48 +02:00
|
|
|
endif()
|