-Changed defaults to SURF/SURF and 2Hz camera
-Added CPACK packaging for Windows git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@15 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
parent
ab8fb21b38
commit
a600190f80
@ -1,9 +1,33 @@
|
|||||||
# Top-Level CmakeLists.txt
|
# Top-Level CmakeLists.txt
|
||||||
cmake_minimum_required(VERSION 2.8.2)
|
cmake_minimum_required(VERSION 2.8.2)
|
||||||
PROJECT( FindObject )
|
PROJECT( FindObject )
|
||||||
|
SET(PROJECT_PREFIX find_object)
|
||||||
|
|
||||||
ADD_DEFINITIONS(-DPROJECT_NAME="${PROJECT_NAME}")
|
ADD_DEFINITIONS(-DPROJECT_NAME="${PROJECT_NAME}")
|
||||||
|
|
||||||
|
#######################
|
||||||
|
# VERSION
|
||||||
|
#######################
|
||||||
|
SET(PROJECT_VERSION "0.1.0")
|
||||||
|
|
||||||
|
STRING(REGEX MATCHALL "[0-9]" PROJECT_VERSION_PARTS "${PROJECT_VERSION}")
|
||||||
|
|
||||||
|
LIST(GET PROJECT_VERSION_PARTS 0 PROJECT_VERSION_MAJOR)
|
||||||
|
LIST(GET PROJECT_VERSION_PARTS 1 PROJECT_VERSION_MINOR)
|
||||||
|
LIST(GET PROJECT_VERSION_PARTS 2 PROJECT_VERSION_PATCH)
|
||||||
|
|
||||||
|
SET(PROJECT_SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||||
|
|
||||||
|
####### COMPILATION PARAMS #######
|
||||||
|
# In case of Makefiles if the user does not setup CMAKE_BUILD_TYPE, assume it's Release:
|
||||||
|
IF(${CMAKE_GENERATOR} MATCHES ".*Makefiles")
|
||||||
|
IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||||
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
|
ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||||
|
ENDIF(${CMAKE_GENERATOR} MATCHES ".*Makefiles")
|
||||||
|
|
||||||
|
SET(CMAKE_DEBUG_POSTFIX "d")
|
||||||
|
|
||||||
####### OUTPUT DIR #######
|
####### OUTPUT DIR #######
|
||||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
|
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
|
||||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
|
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
|
||||||
@ -15,3 +39,54 @@ FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui) # tested on Qt4.7
|
|||||||
|
|
||||||
####### SOURCES (Projects) #######
|
####### SOURCES (Projects) #######
|
||||||
ADD_SUBDIRECTORY( src )
|
ADD_SUBDIRECTORY( src )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#######################
|
||||||
|
# CPACK (Packaging)
|
||||||
|
#######################
|
||||||
|
INCLUDE(InstallRequiredSystemLibraries)
|
||||||
|
|
||||||
|
SET(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
|
||||||
|
SET(CPACK_PACKAGE_VENDOR "${PROJECT_NAME} project")
|
||||||
|
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Find-Object")
|
||||||
|
SET(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
|
||||||
|
SET(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
|
||||||
|
SET(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
|
||||||
|
SET(CPACK_PACKAGE_CONTACT "matlabbe@gmail.com")
|
||||||
|
|
||||||
|
set(CPACK_SOURCE_IGNORE_FILES
|
||||||
|
"\\\\.svn/"
|
||||||
|
"${PROJECT_SOURCE_DIR}/build/[a-zA-Z0-9_]+"
|
||||||
|
"~$"
|
||||||
|
"${PROJECT_SOURCE_DIR}/bin/.*${PROJECT_PREFIX}"
|
||||||
|
"${PROJECT_SOURCE_DIR}/bin/.*${PROJECT_NAME}"
|
||||||
|
"\\\\.DS_Store"
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(WIN32)
|
||||||
|
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
|
||||||
|
|
||||||
|
SET(CPACK_GENERATOR "NSIS;ZIP")
|
||||||
|
SET(CPACK_SOURCE_GENERATOR "ZIP")
|
||||||
|
SET(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
|
||||||
|
#SET(ICON_PATH "${PROJECT_SOURCE_DIR}/app/src/${PROJECT_NAME}.ico")
|
||||||
|
#SET(CPACK_NSIS_MUI_ICON ${ICON_PATH})
|
||||||
|
#SET(CPACK_NSIS_MUI_UNIICON ${ICON_PATH})
|
||||||
|
SET(CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME}")
|
||||||
|
SET(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT})
|
||||||
|
# Set the icon used for the Windows "Add or Remove Programs" tool.
|
||||||
|
#SET(CPACK_NSIS_INSTALLED_ICON_NAME bin\\\\${PROJECT_NAME}.exe)
|
||||||
|
SET(CPACK_PACKAGE_EXECUTABLES "${PROJECT_NAME}" "${PROJECT_NAME}" ${CPACK_PACKAGE_EXECUTABLES})
|
||||||
|
SET(CPACK_CREATE_DESKTOP_LINKS "${PROJECT_NAME}" ${CPACK_CREATE_DESKTOP_LINKS})
|
||||||
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
INCLUDE(CPack)
|
||||||
|
|
||||||
|
MESSAGE(STATUS "--------------------------------------------")
|
||||||
|
MESSAGE(STATUS "Info :")
|
||||||
|
MESSAGE(STATUS " CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}")
|
||||||
|
MESSAGE(STATUS " CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
|
||||||
|
MESSAGE(STATUS "--------------------------------------------")
|
||||||
@ -63,7 +63,57 @@ SET(LIBRARIES
|
|||||||
INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
|
INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
|
||||||
|
|
||||||
# create an executable file
|
# create an executable file
|
||||||
ADD_EXECUTABLE(find_object ${SRC_FILES})
|
ADD_EXECUTABLE(find_object WIN32 ${SRC_FILES})
|
||||||
# Linking with Qt libraries
|
# Linking with Qt libraries
|
||||||
TARGET_LINK_LIBRARIES(find_object ${LIBRARIES})
|
TARGET_LINK_LIBRARIES(find_object ${LIBRARIES})
|
||||||
|
|
||||||
|
IF(WIN32)
|
||||||
|
SET_TARGET_PROPERTIES(find_object PROPERTIES
|
||||||
|
OUTPUT_NAME ${PROJECT_NAME})
|
||||||
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------
|
||||||
|
# Installation stuff
|
||||||
|
#---------------------------
|
||||||
|
INSTALL(TARGETS find_object
|
||||||
|
RUNTIME DESTINATION bin COMPONENT runtime
|
||||||
|
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}" COMPONENT runtime)
|
||||||
|
|
||||||
|
SET(APPS "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/${PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
|
||||||
|
IF(WIN32)
|
||||||
|
SET(plugin_dest_dir bin)
|
||||||
|
SET(qtconf_dest_dir bin)
|
||||||
|
|
||||||
|
# Install needed Qt plugins by copying directories from the qt installation
|
||||||
|
# One can cull what gets copied by using 'REGEX "..." EXCLUDE'
|
||||||
|
# Exclude debug libraries
|
||||||
|
INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/imageformats"
|
||||||
|
DESTINATION ${plugin_dest_dir}/plugins
|
||||||
|
COMPONENT runtime
|
||||||
|
REGEX ".*d4.dll" EXCLUDE
|
||||||
|
REGEX ".*d4.a" EXCLUDE)
|
||||||
|
|
||||||
|
# install a qt.conf file
|
||||||
|
# this inserts some cmake code into the install script to write the file
|
||||||
|
SET(QT_CONF_FILE [Paths]\nPlugins=plugins)
|
||||||
|
INSTALL(CODE "
|
||||||
|
file(WRITE \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"${QT_CONF_FILE}\")
|
||||||
|
" COMPONENT runtime)
|
||||||
|
|
||||||
|
# directories to look for dependencies
|
||||||
|
SET(DIRS ${QT_LIBRARY_DIRS} ${PROJECT_SOURCE_DIR}/bin)
|
||||||
|
|
||||||
|
# Now the work of copying dependencies into the bundle/package
|
||||||
|
# The quotes are escaped and variables to use at install time have their $ escaped
|
||||||
|
# An alternative is the do a configure_file() on a script and use install(SCRIPT ...).
|
||||||
|
# Note that the image plugins depend on QtSvg and QtXml, and it got those copied
|
||||||
|
# over.
|
||||||
|
# To find dependencies, cmake use "otool" on Apple and "dumpbin" on Windows (make sure you have one of them).
|
||||||
|
install(CODE "
|
||||||
|
file(GLOB_RECURSE QTPLUGINS \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
|
||||||
|
include(\"BundleUtilities\")
|
||||||
|
fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\")
|
||||||
|
" COMPONENT runtime)
|
||||||
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
|||||||
@ -42,11 +42,11 @@ class Settings
|
|||||||
PARAMETER(Camera, deviceId, int, 0);
|
PARAMETER(Camera, deviceId, int, 0);
|
||||||
PARAMETER(Camera, imageWidth, int, 640);
|
PARAMETER(Camera, imageWidth, int, 640);
|
||||||
PARAMETER(Camera, imageHeight, int, 480);
|
PARAMETER(Camera, imageHeight, int, 480);
|
||||||
PARAMETER(Camera, imageRate, int, 5); // Hz
|
PARAMETER(Camera, imageRate, int, 2); // Hz
|
||||||
|
|
||||||
//List format : [Index:item0;item1;item3;...]
|
//List format : [Index:item0;item1;item3;...]
|
||||||
PARAMETER(Detector, Type, QString, "1:Dense;Fast;GoodFeaturesToTrack;Mser;Orb;Sift;Star;Surf");
|
PARAMETER(Detector, Type, QString, "7:Dense;Fast;GoodFeaturesToTrack;Mser;Orb;Sift;Star;Surf");
|
||||||
PARAMETER(Descriptor, Type, QString, "0:Brief;Orb;Sift;Surf");
|
PARAMETER(Descriptor, Type, QString, "3:Brief;Orb;Sift;Surf");
|
||||||
|
|
||||||
PARAMETER(Brief, bytes, int, 32);
|
PARAMETER(Brief, bytes, int, 32);
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ class Settings
|
|||||||
PARAMETER(Star, lineThresholdBinarized, int, cvStarDetectorParams().lineThresholdBinarized);
|
PARAMETER(Star, lineThresholdBinarized, int, cvStarDetectorParams().lineThresholdBinarized);
|
||||||
PARAMETER(Star, suppressNonmaxSize, int, cvStarDetectorParams().suppressNonmaxSize);
|
PARAMETER(Star, suppressNonmaxSize, int, cvStarDetectorParams().suppressNonmaxSize);
|
||||||
|
|
||||||
PARAMETER(Surf, hessianThreshold, double, 400.0);
|
PARAMETER(Surf, hessianThreshold, double, 600.0);
|
||||||
PARAMETER(Surf, octaves, int, 3);
|
PARAMETER(Surf, octaves, int, 3);
|
||||||
PARAMETER(Surf, octaveLayers, int, 4);
|
PARAMETER(Surf, octaveLayers, int, 4);
|
||||||
PARAMETER(Surf, upright, bool, false);
|
PARAMETER(Surf, upright, bool, false);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user