Commit 301c5b12f3c17d013ecb4b8d04e55d1d4b57fda0
Merge branch 'master' of https://github.com/biometrics/openbr into HEAD
Showing
14 changed files
with
192 additions
and
88 deletions
CMakeLists.txt
| ... | ... | @@ -9,9 +9,15 @@ set(CPACK_PACKAGE_NAME "OpenBR") |
| 9 | 9 | set(CPACK_PACKAGE_VENDOR "OpenBiometrics") |
| 10 | 10 | set(CPACK_PACKAGE_DESCRIPTION "Open Source Biometric Recognition") |
| 11 | 11 | set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) |
| 12 | -set(CPACK_PACKAGE_VERSION_MAJOR 0) | |
| 13 | -set(CPACK_PACKAGE_VERSION_MINOR 6) | |
| 14 | -set(CPACK_PACKAGE_VERSION_PATCH 0) | |
| 12 | +if(NOT DEFINED CPACK_PACKAGE_VERSION_MAJOR) | |
| 13 | + set(CPACK_PACKAGE_VERSION_MAJOR 0) | |
| 14 | +endif() | |
| 15 | +if(NOT DEFINED CPACK_PACKAGE_VERSION_MINOR) | |
| 16 | + set(CPACK_PACKAGE_VERSION_MINOR 6) | |
| 17 | +endif() | |
| 18 | +if(NOT DEFINED CPACK_PACKAGE_VERSION_PATCH) | |
| 19 | + set(CPACK_PACKAGE_VERSION_PATCH 0) | |
| 20 | +endif() | |
| 15 | 21 | set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") |
| 16 | 22 | set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") |
| 17 | 23 | set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") |
| ... | ... | @@ -67,20 +73,10 @@ if(${BR_EMBEDDED}) |
| 67 | 73 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBR_EMBEDDED") |
| 68 | 74 | endif() |
| 69 | 75 | |
| 70 | -option(BR_DISTRIBUTED "Target distributed memory models") | |
| 71 | -if(${BR_DISTRIBUTED}) | |
| 72 | - find_package(MPI REQUIRED) | |
| 73 | - set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS}) | |
| 74 | - set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS}) | |
| 75 | - include_directories(MPI_INCLUDE_PATH) | |
| 76 | - set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -DBR_DISTRIBUTED) | |
| 77 | - set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${MPI_LIBRARY}) | |
| 78 | -endif() | |
| 79 | - | |
| 80 | 76 | # Find Qt |
| 81 | 77 | set(QT_DEPENDENCIES Concurrent Core) |
| 82 | 78 | option(BR_EMBEDDED "Limit software dependencies") |
| 83 | -if(NOT ${BR_EMBEDDED}) | |
| 79 | +if(NOT BR_EMBEDDED) | |
| 84 | 80 | set(QT_DEPENDENCIES ${QT_DEPENDENCIES} Gui Network Sql Widgets Xml) |
| 85 | 81 | endif() |
| 86 | 82 | foreach(QT_DEPENDENCY ${QT_DEPENDENCIES}) |
| ... | ... | @@ -90,8 +86,8 @@ set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${Qt5Core_QTMAIN_LIBRARIES}) |
| 90 | 86 | |
| 91 | 87 | # Find OpenCV |
| 92 | 88 | find_package(OpenCV 2.4.5 REQUIRED) |
| 93 | -set(OPENCV_DEPENDENCIES opencv_calib3d opencv_core opencv_features2d opencv_flann opencv_gpu opencv_highgui opencv_imgproc opencv_ml opencv_nonfree opencv_objdetect opencv_photo opencv_video opencv_videostab opencv_superres opencv_stitching opencv_ocl opencv_legacy opencv_contrib) | |
| 94 | -set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${OpenCV_LIBS}) | |
| 89 | +set(OPENCV_DEPENDENCIES opencv_core opencv_highgui opencv_imgproc opencv_ml opencv_objdetect) | |
| 90 | +set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${OPENCV_DEPENDENCIES}) | |
| 95 | 91 | |
| 96 | 92 | # Find Alphanum |
| 97 | 93 | find_package(Alphanum REQUIRED) |
| ... | ... | @@ -142,7 +138,6 @@ endif() |
| 142 | 138 | # Look for extensions to OpenBR |
| 143 | 139 | set(BR_THIRDPARTY_PLUGINS_DIR CACHE PATH "") |
| 144 | 140 | set(BR_THIRDPARTY_APPS_DIR CACHE PATH "") |
| 145 | -set(BR_THIRDPARTY_DIR CACHE PATH "") | |
| 146 | 141 | mark_as_advanced(BR_THIRDPARTY_PLUGINS_DIR) |
| 147 | 142 | mark_as_advanced(BR_THIRDPARTY_APPS_DIR) |
| 148 | 143 | |
| ... | ... | @@ -156,9 +151,6 @@ if(BR_THIRDPARTY_DIR) |
| 156 | 151 | if(EXISTS "${BR_THIRDPARTY_DIR}/app") |
| 157 | 152 | set(BR_THIRDPARTY_APPS_DIR ${BR_THIRDPARTY_APPS_DIR} "${BR_THIRDPARTY_DIR}/app") |
| 158 | 153 | endif() |
| 159 | - if (EXISTS "${BR_THIRDPARTY_DIR}/share") | |
| 160 | - install(DIRECTORY ${BR_THIRDPARTY_DIR}/share DESTINATION .) | |
| 161 | - endif() | |
| 162 | 154 | else() |
| 163 | 155 | set(BR_THIRDPARTY_DIR "" CACHE PATH "Path to proprietary software") |
| 164 | 156 | mark_as_advanced(BR_THIRDPARTY_DIR) |
| ... | ... | @@ -177,9 +169,12 @@ foreach(DIR ${BR_THIRDPARTY_APPS_DIR}) |
| 177 | 169 | endforeach() |
| 178 | 170 | |
| 179 | 171 | # Install |
| 180 | -install(FILES LICENSE.txt README.md DESTINATION share/openbr) | |
| 181 | -install(DIRECTORY share DESTINATION .) | |
| 182 | -install(DIRECTORY ${BR_THIRDPARTY_SHARE} DESTINATION share) | |
| 172 | +option(BR_INSTALL_SHARE "Install share/openbr files." ON) | |
| 173 | +if(${BR_INSTALL_SHARE}) | |
| 174 | + install(FILES LICENSE.txt README.md DESTINATION share/openbr) | |
| 175 | + install(DIRECTORY share DESTINATION .) | |
| 176 | + install(DIRECTORY ${BR_THIRDPARTY_SHARE} DESTINATION share) | |
| 177 | +endif() | |
| 183 | 178 | |
| 184 | 179 | # install brpy |
| 185 | 180 | option(BR_INSTALL_BRPY "Install brpy, the Python wrapper to the C API (requires Python)") |
| ... | ... | @@ -190,29 +185,29 @@ if(${BR_INSTALL_BRPY}) |
| 190 | 185 | endif() |
| 191 | 186 | |
| 192 | 187 | # Package |
| 193 | -if (NOT BR_PACKAGE_THIRDPARTY) | |
| 194 | -set(CPACK_PACKAGE_EXECUTABLES "OpenBR" "OpenBR") | |
| 195 | -set(CPACK_CREATE_DESKTOP_LINKS "OpenBR") | |
| 196 | -if(CMAKE_HOST_WIN32) | |
| 197 | - set(CPACK_NSIS_MODIFY_PATH ON) | |
| 198 | - set(CPACK_NSIS_MUI_ICON ${NATIVE_ICON}) | |
| 199 | - set(CPACK_NSIS_MUI_UNIICON ${NATIVE_ICON}) | |
| 200 | - set(CPACK_NSIS_MENU_LINKS "doc/html/index.html" "Documentation") | |
| 201 | - if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") | |
| 202 | - set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") | |
| 188 | +if(NOT BR_PACKAGE_THIRDPARTY) | |
| 189 | + set(CPACK_PACKAGE_EXECUTABLES "OpenBR" "OpenBR") | |
| 190 | + set(CPACK_CREATE_DESKTOP_LINKS "OpenBR") | |
| 191 | + if(CMAKE_HOST_WIN32) | |
| 192 | + set(CPACK_NSIS_MODIFY_PATH ON) | |
| 193 | + set(CPACK_NSIS_MUI_ICON ${NATIVE_ICON}) | |
| 194 | + set(CPACK_NSIS_MUI_UNIICON ${NATIVE_ICON}) | |
| 195 | + set(CPACK_NSIS_MENU_LINKS "doc/html/index.html" "Documentation") | |
| 196 | + if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") | |
| 197 | + set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") | |
| 198 | + endif() | |
| 199 | + set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\br-gui.exe") | |
| 200 | + elseif(CMAKE_HOST_APPLE) | |
| 201 | + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/README.md" "README.txt" COPYONLY) | |
| 202 | + set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") | |
| 203 | + set(CPACK_BUNDLE_NAME ${CPACK_PACKAGE_NAME}) | |
| 204 | + set(CPACK_BUNDLE_ICON ${NATIVE_ICON}) | |
| 205 | + set(CPACK_BUNDLE_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) | |
| 206 | + set(CPACK_BUNDLE_STARTUP_COMMAND ${BR_SHARE_DIR}/bundle.sh) | |
| 207 | + configure_file(${BR_SHARE_DIR}/Info.plist.in Info.plist) | |
| 208 | + else() | |
| 209 | + set(CPACK_DEBIAN_PACKAGE_MAINTAINER "josh.klontz@gmail.com") | |
| 203 | 210 | endif() |
| 204 | - set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\br-gui.exe") | |
| 205 | -elseif(CMAKE_HOST_APPLE) | |
| 206 | - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/README.md" "README.txt" COPYONLY) | |
| 207 | - set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") | |
| 208 | - set(CPACK_BUNDLE_NAME ${CPACK_PACKAGE_NAME}) | |
| 209 | - set(CPACK_BUNDLE_ICON ${NATIVE_ICON}) | |
| 210 | - set(CPACK_BUNDLE_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) | |
| 211 | - set(CPACK_BUNDLE_STARTUP_COMMAND ${BR_SHARE_DIR}/bundle.sh) | |
| 212 | - configure_file(${BR_SHARE_DIR}/Info.plist.in Info.plist) | |
| 213 | -else() | |
| 214 | - set(CPACK_DEBIAN_PACKAGE_MAINTAINER "josh.klontz@gmail.com") | |
| 215 | -endif() | |
| 216 | 211 | |
| 217 | -include(CPack) | |
| 212 | + include(CPack) | |
| 218 | 213 | endif() | ... | ... |
app/CMakeLists.txt
| 1 | 1 | # Build the command line interface |
| 2 | 2 | add_subdirectory(br) |
| 3 | 3 | |
| 4 | -if (NOT BR_PACKAGE_THIRDPARTY) | |
| 5 | -# Build examples/tests | |
| 6 | -add_subdirectory(examples) | |
| 4 | +if(NOT BR_PACKAGE_THIRDPARTY) | |
| 5 | + if(NOT BR_EMBEDDED) | |
| 6 | + # Build examples/tests | |
| 7 | + add_subdirectory(examples) | |
| 7 | 8 | |
| 8 | -# Build additional OpenBR utilities | |
| 9 | -if(NOT ${BR_EMBEDDED}) | |
| 10 | - add_subdirectory(br-gui) | |
| 11 | -endif() | |
| 9 | + # Build additional OpenBR utilities | |
| 10 | + add_subdirectory(br-gui) | |
| 11 | + endif() | |
| 12 | 12 | endif() | ... | ... |
openbr/CMakeLists.txt
| ... | ... | @@ -2,19 +2,26 @@ |
| 2 | 2 | configure_file(${BR_SHARE_DIR}/version.h.in version.h) |
| 3 | 3 | include_directories(${CMAKE_CURRENT_BINARY_DIR}) |
| 4 | 4 | |
| 5 | -# Janus API | |
| 6 | -include_directories(janus/include) | |
| 7 | -install(DIRECTORY janus/include DESTINATION .) | |
| 8 | -set(BR_JANUS janus/src/opencv_io/opencv_io.cpp) | |
| 9 | -add_definitions(-DJANUS_LIBRARY) | |
| 10 | - | |
| 11 | 5 | # Collect source files |
| 12 | -aux_source_directory(. SRC) | |
| 6 | +set(SRC openbr.cpp | |
| 7 | + openbr_plugin.cpp | |
| 8 | + universal_template.cpp) | |
| 13 | 9 | aux_source_directory(core BR_CORE) |
| 14 | 10 | include(plugins/plugins.cmake) |
| 15 | 11 | |
| 12 | +# Janus API | |
| 13 | +option(BR_WITH_JANUS "Build IARPA Janus related applications." ON) | |
| 14 | +if(BR_WITH_JANUS) | |
| 15 | + include_directories(janus/include) | |
| 16 | + install(DIRECTORY janus/include DESTINATION .) | |
| 17 | + set(BR_JANUS janus.cpp | |
| 18 | + janus_io.cpp | |
| 19 | + janus/src/opencv_io/opencv_io.cpp) | |
| 20 | + add_definitions(-DJANUS_LIBRARY) | |
| 21 | +endif() | |
| 22 | + | |
| 16 | 23 | # Optional GUI module |
| 17 | -if(NOT ${BR_EMBEDDED}) | |
| 24 | +if(NOT BR_EMBEDDED) | |
| 18 | 25 | aux_source_directory(gui BR_GUI) |
| 19 | 26 | qt5_add_resources(BR_ICONS ../share/openbr/icons.qrc) |
| 20 | 27 | file(GLOB HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/gui/*.h) |
| ... | ... | @@ -32,14 +39,13 @@ target_link_libraries(openbr ${BR_THIRDPARTY_LIBS}) |
| 32 | 39 | add_cppcheck(openbr) |
| 33 | 40 | |
| 34 | 41 | # Janus implementation |
| 35 | -set(BR_WITH_JANUS ON CACHE BOOL "Build IARPA Janus related applications.") | |
| 36 | -if (BR_WITH_JANUS) | |
| 37 | -set(JANUS_BUILD_PP5_WRAPPER ${BR_WITH_PP5} CACHE BOOL "Build Janus implementation using PittPatt 5") | |
| 38 | -set(JANUS_BUILD_DOCS ${BR_BUILD_DOCUMENTATION} CACHE BOOL "Build Janus HTML Doxygen documentation") | |
| 39 | -mark_as_advanced(JANUS_BUILD_PP5_WRAPPER) | |
| 40 | -mark_as_advanced(JANUS_BUILD_DOCS) | |
| 41 | -set(JANUS_IMPLEMENTATION openbr) | |
| 42 | -add_subdirectory(janus) | |
| 42 | +if(BR_WITH_JANUS) | |
| 43 | + set(JANUS_BUILD_PP5_WRAPPER ${BR_WITH_PP5} CACHE BOOL "Build Janus implementation using PittPatt 5") | |
| 44 | + set(JANUS_BUILD_DOCS ${BR_BUILD_DOCUMENTATION} CACHE BOOL "Build Janus HTML Doxygen documentation") | |
| 45 | + mark_as_advanced(JANUS_BUILD_PP5_WRAPPER) | |
| 46 | + mark_as_advanced(JANUS_BUILD_DOCS) | |
| 47 | + set(JANUS_IMPLEMENTATION openbr) | |
| 48 | + add_subdirectory(janus) | |
| 43 | 49 | endif() |
| 44 | 50 | |
| 45 | 51 | # Install |
| ... | ... | @@ -52,6 +58,9 @@ install(FILES ${HEADERS} DESTINATION include/openbr) |
| 52 | 58 | include(InstallDependencies) |
| 53 | 59 | install_compiler_libraries() |
| 54 | 60 | install_qt_libraries(QT_DEPENDENCIES) |
| 55 | -install_qt_imageformats() | |
| 61 | +if(NOT BR_EMBEDDED) | |
| 62 | + install_qt_imageformats() | |
| 63 | +endif() | |
| 56 | 64 | install_qt_misc() |
| 57 | 65 | install_opencv_libraries(OPENCV_DEPENDENCIES) |
| 66 | +install_ffmpeg() | ... | ... |
openbr/openbr.cpp
| ... | ... | @@ -305,11 +305,16 @@ const char *br_version() |
| 305 | 305 | |
| 306 | 306 | void br_slave_process(const char *baseName) |
| 307 | 307 | { |
| 308 | +#ifndef BR_EMBEDDED | |
| 308 | 309 | WorkerProcess *worker = new WorkerProcess; |
| 309 | 310 | worker->transform = Globals->algorithm; |
| 310 | 311 | worker->baseName = baseName; |
| 311 | 312 | worker->mainLoop(); |
| 312 | 313 | delete worker; |
| 314 | +#else | |
| 315 | + (void) baseName; | |
| 316 | + qFatal("br_slave_process not supported in embedded builds!"); | |
| 317 | +#endif | |
| 313 | 318 | } |
| 314 | 319 | |
| 315 | 320 | br_template br_load_img(const char *data, int len) | ... | ... |
openbr/openbr_plugin.cpp
| ... | ... | @@ -19,7 +19,6 @@ |
| 19 | 19 | #include <QFutureSynchronizer> |
| 20 | 20 | #include <QJsonDocument> |
| 21 | 21 | #include <QJsonObject> |
| 22 | -#include <QLocalSocket> | |
| 23 | 22 | #include <QMetaProperty> |
| 24 | 23 | #include <qnumeric.h> |
| 25 | 24 | #include <QPointF> |
| ... | ... | @@ -47,8 +46,6 @@ |
| 47 | 46 | using namespace br; |
| 48 | 47 | using namespace cv; |
| 49 | 48 | |
| 50 | -Q_DECLARE_METATYPE(QLocalSocket::LocalSocketState) | |
| 51 | - | |
| 52 | 49 | static const QMetaObject *getInterface(const QObject *obj) |
| 53 | 50 | { |
| 54 | 51 | const QMetaObject *baseClass = obj->metaObject(); |
| ... | ... | @@ -1277,8 +1274,6 @@ void br::Context::initialize(int &argc, char *argv[], QString sdkPath, bool useG |
| 1277 | 1274 | qRegisterMetaType< QList<br::Distance*> >(); |
| 1278 | 1275 | qRegisterMetaType< QList<br::Representation* > >(); |
| 1279 | 1276 | qRegisterMetaType< QList<br::Classifier* > >(); |
| 1280 | - qRegisterMetaType< QAbstractSocket::SocketState> (); | |
| 1281 | - qRegisterMetaType< QLocalSocket::LocalSocketState> (); | |
| 1282 | 1277 | |
| 1283 | 1278 | Globals = new Context(); |
| 1284 | 1279 | Globals->init(File()); | ... | ... |
openbr/plugins/cmake/eigen3.cmake
| ... | ... | @@ -2,7 +2,9 @@ set(BR_WITH_EIGEN3 ON CACHE BOOL "Build Eigen3 plugins") |
| 2 | 2 | |
| 3 | 3 | if(${BR_WITH_EIGEN3}) |
| 4 | 4 | find_package(Eigen3 REQUIRED) |
| 5 | - install(FILES ${EIGEN3_LICENSE} RENAME Eigen3 DESTINATION share/openbr/licenses) | |
| 5 | + if(${BR_INSTALL_SHARE}) | |
| 6 | + install(FILES ${EIGEN3_LICENSE} RENAME Eigen3 DESTINATION share/openbr/licenses) | |
| 7 | + endif() | |
| 6 | 8 | else() |
| 7 | 9 | set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/classification/lda.cpp) |
| 8 | 10 | set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/distance/L1.cpp) | ... | ... |
openbr/plugins/cmake/network.cmake
| 1 | -set(BR_WITH_QTNETWORK ON CACHE BOOL "Build with QtNetwork") | |
| 1 | +option(BR_WITH_QTNETWORK "Build with QtNetwork" ON) | |
| 2 | 2 | if(${BR_WITH_QTNETWORK}) |
| 3 | 3 | find_package(Qt5Network) |
| 4 | 4 | find_package(HttpParser) |
| 5 | 5 | set(QT_DEPENDENCIES ${QT_DEPENDENCIES} Network) |
| 6 | 6 | set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} ${HTTPPARSER_SRC}) |
| 7 | - install(FILES ${HTTPPARSER_LICENSE} RENAME http-parser DESTINATION share/openbr/licenses) | |
| 7 | + if(${BR_INSTALL_SHARE}) | |
| 8 | + install(FILES ${HTTPPARSER_LICENSE} RENAME http-parser DESTINATION share/openbr/licenses) | |
| 9 | + endif() | |
| 8 | 10 | else() |
| 9 | - set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/format/url.cpp) | |
| 10 | - set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/format/post.cpp) | |
| 11 | - set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/gallery/post.cpp) | |
| 11 | + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/core/processwrapper.cpp | |
| 12 | + plugins/io/download.cpp | |
| 13 | + plugins/format/url.cpp | |
| 14 | + plugins/format/post.cpp | |
| 15 | + plugins/gallery/google.cpp | |
| 16 | + plugins/gallery/post.cpp) | |
| 12 | 17 | endif() | ... | ... |
openbr/plugins/cmake/opencv.cmake
0 โ 100644
| 1 | +option(BR_WITH_OPENCV_CONTRIB "Build with OpenCV contrib plugins." ON) | |
| 2 | +if(${BR_WITH_OPENCV_CONTRIB}) | |
| 3 | + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} opencv_contrib) | |
| 4 | + set(OPENCV_DEPENDENCIES ${OPENCV_DEPENDENCIES} opencv_contrib) | |
| 5 | +else() | |
| 6 | + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/imgproc/heatmap.cpp | |
| 7 | + plugins/imgproc/shapeaxisratio.cpp) | |
| 8 | +endif() | |
| 9 | + | |
| 10 | +option(BR_WITH_OPENCV_FEATURES2D "Build with OpenCV features2d plugins." ON) | |
| 11 | +if(${BR_WITH_OPENCV_FEATURES2D}) | |
| 12 | + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} opencv_features2d) | |
| 13 | + set(OPENCV_DEPENDENCIES ${OPENCV_DEPENDENCIES} opencv_features2d) | |
| 14 | +else() | |
| 15 | + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/distance/keypointmatcher.cpp | |
| 16 | + plugins/imgproc/keypointdescriptor.cpp | |
| 17 | + plugins/metadata/keypointdetector.cpp) | |
| 18 | +endif() | |
| 19 | + | |
| 20 | +option(BR_WITH_OPENCV_FLANN "Build with OpenCV flann plugins." ON) | |
| 21 | +if(${BR_WITH_OPENCV_FLANN}) | |
| 22 | + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} opencv_flann) | |
| 23 | + set(OPENCV_DEPENDENCIES ${OPENCV_DEPENDENCIES} opencv_flann) | |
| 24 | +else() | |
| 25 | + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/cluster/kmeans.cpp | |
| 26 | + plugins/cluster/randomcentroids.cpp) | |
| 27 | +endif() | |
| 28 | + | |
| 29 | +option(BR_WITH_OPENCV_NONFREE "Build with OpenCV nonfree plugins." ON) | |
| 30 | +if(${BR_WITH_OPENCV_NONFREE}) | |
| 31 | + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} opencv_nonfree) | |
| 32 | + set(OPENCV_DEPENDENCIES ${OPENCV_DEPENDENCIES} opencv_nonfree) | |
| 33 | +else() | |
| 34 | + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/imgproc/custom_sift.cpp | |
| 35 | + plugins/imgproc/sift.cpp) | |
| 36 | +endif() | |
| 37 | + | |
| 38 | +option(BR_WITH_OPENCV_PHOTO "Build with OpenCV photo plugins." ON) | |
| 39 | +if(${BR_WITH_OPENCV_PHOTO}) | |
| 40 | + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} opencv_photo) | |
| 41 | + set(OPENCV_DEPENDENCIES ${OPENCV_DEPENDENCIES} opencv_photo) | |
| 42 | +else() | |
| 43 | + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/imgproc/denoising.cpp | |
| 44 | + plugins/imgproc/inpaint.cpp) | |
| 45 | +endif() | |
| 46 | + | |
| 47 | +option(BR_WITH_OPENCV_VIDEO "Build with OpenCV video plugins." ON) | |
| 48 | +if(${BR_WITH_OPENCV_VIDEO}) | |
| 49 | + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} opencv_video) | |
| 50 | + set(OPENCV_DEPENDENCIES ${OPENCV_DEPENDENCIES} opencv_video) | |
| 51 | +else() | |
| 52 | + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/imgproc/opticalflow.cpp) | |
| 53 | +endif() | ... | ... |
openbr/plugins/cmake/stasm4.cmake
openbr/plugins/cmake/vbb.cmake
openbr/plugins/core/processwrapper.cpp
| ... | ... | @@ -26,6 +26,8 @@ |
| 26 | 26 | #include <openbr/plugins/openbr_internal.h> |
| 27 | 27 | #include <openbr/core/opencvutils.h> |
| 28 | 28 | |
| 29 | +Q_DECLARE_METATYPE(QLocalSocket::LocalSocketState) | |
| 30 | + | |
| 29 | 31 | using namespace cv; |
| 30 | 32 | |
| 31 | 33 | namespace br |
| ... | ... | @@ -39,6 +41,9 @@ public: |
| 39 | 41 | QThread *basis; |
| 40 | 42 | CommunicationManager() |
| 41 | 43 | { |
| 44 | + qRegisterMetaType< QAbstractSocket::SocketState> (); | |
| 45 | + qRegisterMetaType< QLocalSocket::LocalSocketState> (); | |
| 46 | + | |
| 42 | 47 | timeout_ms = 30000; |
| 43 | 48 | |
| 44 | 49 | basis = new QThread; | ... | ... |
openbr/plugins/imgproc/custom_sift.cpp
share/openbr/cmake/InstallDependencies.cmake
| ... | ... | @@ -116,3 +116,38 @@ function(install_r_runtime) |
| 116 | 116 | install(DIRECTORY ${R_DIR}/ DESTINATION R) |
| 117 | 117 | endif() |
| 118 | 118 | endfunction() |
| 119 | + | |
| 120 | +# FFMPEG | |
| 121 | +function(install_ffmpeg_help LIB) | |
| 122 | + if(LIB) | |
| 123 | + string(REGEX REPLACE "\\.[^.]*$" "" STRIPEXT ${LIB}) | |
| 124 | + file(GLOB LIBS "${STRIPEXT}.*[^a]") | |
| 125 | + install(FILES ${LIBS} DESTINATION lib) | |
| 126 | + endif() | |
| 127 | +endfunction() | |
| 128 | + | |
| 129 | +function(install_ffmpeg) | |
| 130 | + if(${BR_INSTALL_DEPENDENCIES}) | |
| 131 | + if(WIN32) | |
| 132 | + list(GET OpenCV_LIB_DIR 0 cv_lib_stripped) | |
| 133 | + if(${CMAKE_SIZEOF_VOID_P} MATCHES 8) | |
| 134 | + set(FFMPEGSUFFIX "_64") | |
| 135 | + else() | |
| 136 | + set(FFMPEGSUFFIX "") | |
| 137 | + endif() | |
| 138 | + install(FILES ${cv_lib_stripped}/../bin/${BR_INSTALL_DEPENDENCIES_PREFIX}opencv_ffmpeg${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}${FFMPEGSUFFIX}.dll DESTINATION bin) | |
| 139 | + else() | |
| 140 | + # find_library(AVCODEC avcodec) | |
| 141 | + # install_ffmpeg_help(${AVCODEC}) | |
| 142 | + | |
| 143 | + # find_library(AVUTIL avutil) | |
| 144 | + # install_ffmpeg_help(${AVUTIL}) | |
| 145 | + | |
| 146 | + # find_library(AVFORMAT avformat) | |
| 147 | + # install_ffmpeg_help(${AVFORMAT}) | |
| 148 | + | |
| 149 | + # find_library(SWSCALE swscale) | |
| 150 | + # install_ffmpeg_help(${SWSCALE}) | |
| 151 | + endif() | |
| 152 | + endif() | |
| 153 | +endfunction() | ... | ... |
share/openbr/plotting/plot_utils.R
| ... | ... | @@ -91,8 +91,8 @@ plotLine <- function(lineData=NULL, options=NULL, flipY=FALSE, geometry="line") |
| 91 | 91 | else |
| 92 | 92 | p <- p + scale_y_continuous(labels=if("yLabels" %in% names(options)) eval(parse(text=options$yLabels)) else percent, breaks=if("yBreaks" %in% names(options)) eval(parse(text=options$yBreaks)) else pretty_breaks(n=10)) |
| 93 | 93 | |
| 94 | - if ("xLimits" %in% names(options)) p <- p + xlim(eval(parse(text=options$xLimits))) | |
| 95 | - if ("yLimits" %in% names(options)) p <- p + ylim(eval(parse(text=options$yLimits))) | |
| 94 | + if ("xLimits" %in% names(options)) p <- p + coord_cartesian(xlim=eval(parse(text=options$xLimits))) | |
| 95 | + if ("yLimits" %in% names(options)) p <- p + coord_cartesian(ylim=eval(parse(text=options$yLimits))) | |
| 96 | 96 | p <- p + theme(legend.title = element_text(size = textSize), legend.text = element_text(size = textSize), plot.title = element_text(size = textSize), axis.text = element_text(size = textSize), axis.title.x = element_text(size = textSize), axis.title.y = element_text(size = textSize), legend.position=if("legendPosition" %in% names(options)) eval(parse(text=options$legendPosition)) else "bottom", legend.background = element_rect(fill = 'white'), panel.grid.major = element_line(colour = "gray"), panel.grid.minor = element_line(colour = "gray", linetype = "dashed")) |
| 97 | 97 | p <- p + guides(col=guide_legend(ncol=ncol)) |
| 98 | 98 | return(p) |
| ... | ... | @@ -240,8 +240,8 @@ summarySE <- function(data=NULL, measurevar, groupvars=NULL, na.rm=FALSE, conf.i |
| 240 | 240 | ciMult <- qt(conf.interval/2 + .5, datac$N-1) |
| 241 | 241 | datac$ci <- datac$se * ciMult |
| 242 | 242 | |
| 243 | - datac$upper <- if(datac[, measurevar] + datac$ci < 1) (datac[, measurevar] + datac$ci) else 1 | |
| 244 | - datac$lower <- if(datac[, measurevar] - datac$ci > 0) (datac[, measurevar] - datac$ci) else 0 | |
| 243 | + datac$upper <- ifelse(datac[,measurevar] + datac$ci < 1, datac[,measurevar] + datac$ci, 1) | |
| 244 | + datac$lower <- ifelse(datac[,measurevar] - datac$ci > 0, datac[,measurevar] - datac$ci, 0) | |
| 245 | 245 | |
| 246 | 246 | return(datac) |
| 247 | 247 | } | ... | ... |