Commit 64c0a61e74a7dc8d41ea4e2c38c201c8a732201e

Authored by Josh Klontz
1 parent 8fbb3896

updated to latest janus

openbr/CMakeLists.txt
... ... @@ -5,6 +5,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
5 5 # Janus API
6 6 include_directories(janus/include)
7 7 install(DIRECTORY janus/include DESTINATION .)
  8 +set(BR_JANUS janus/src/janus_io.cpp janus/src/opencv_io/opencv_io.cpp)
  9 +add_definitions(-DJANUS_LIBRARY)
8 10  
9 11 # Collect source files
10 12 aux_source_directory(. SRC)
... ... @@ -19,7 +21,7 @@ if(NOT ${BR_EMBEDDED})
19 21 install(FILES ${HEADERS} DESTINATION include/openbr/gui)
20 22 endif()
21 23  
22   -add_library(openbr SHARED ${SRC} ${BR_CORE} ${BR_GUI} ${BR_ICONS} ${BR_THIRDPARTY_SRC} ${BR_RESOURCES} ${NATURALSTRINGCOMPARE_SRC})
  24 +add_library(openbr SHARED ${SRC} ${BR_CORE} ${BR_JANUS} ${BR_GUI} ${BR_ICONS} ${BR_THIRDPARTY_SRC} ${BR_RESOURCES} ${NATURALSTRINGCOMPARE_SRC})
23 25 qt5_use_modules(openbr ${QT_DEPENDENCIES})
24 26 set_target_properties(openbr PROPERTIES
25 27 DEFINE_SYMBOL BR_LIBRARY
... ...
1   -Subproject commit f8d9c869c821cc032d092ab1274da8f3cabf5eb7
  1 +Subproject commit cdac0b653134087198dd9230bc0956d4dfab4b85
... ...
openbr/janus.cpp
1   -#ifdef BR_LIBRARY
2   - #define JANUS_LIBRARY
3   -#endif
4   -
5 1 #include "janus.h"
6 2 #include "janus_io.h"
7 3 #include "openbr_plugin.h"
... ... @@ -20,7 +16,7 @@ janus_error janus_initialize(const char *sdk_path, const char *model_file)
20 16 {
21 17 int argc = 1;
22 18 const char *argv[1] = { "janus" };
23   - Context::initialize(argc, (char**)argv, sdk_path);
  19 + Context::initialize(argc, (char**)argv, sdk_path, false);
24 20 QString algorithm = model_file;
25 21 if (algorithm.isEmpty()) {
26 22 transform = Transform::fromAlgorithm("Cvt(Gray)+Affine(88,88,0.25,0.35)+<FaceRecognitionExtraction>+<FaceRecognitionEmbedding>+<FaceRecognitionQuantization>", false);
... ...
openbr/janus_io.cpp deleted
1   -#ifdef BR_LIBRARY
2   - #define JANUS_LIBRARY
3   -#endif
4   -
5   -// Use the provided default implementation of some functions
6   -#include "janus/src/janus_io.cpp"
7   -
8   -// Use the provided OpenCV I/O implementation
9   -#include "janus/src/opencv_io/opencv_io.cpp"