Commit 6023480a99e9cb2b45a3b5f059579c821cee97c7

Authored by Josh Klontz
1 parent 9a8d3ef9

janus hello world works

openbr/CMakeLists.txt
@@ -3,11 +3,6 @@ configure_file(${BR_SHARE_DIR}/version.h.in version.h) @@ -3,11 +3,6 @@ configure_file(${BR_SHARE_DIR}/version.h.in version.h)
3 include_directories(${CMAKE_CURRENT_BINARY_DIR}) 3 include_directories(${CMAKE_CURRENT_BINARY_DIR})
4 4
5 # Janus API 5 # Janus API
6 -set(JANUS_BUILD_PP5_WRAPPER ${BR_WITH_PP5} CACHE BOOL "Build Janus implementation using PittPatt 5")  
7 -set(JANUS_BUILD_DOCS ${BR_BUILD_DOCUMENTATION} CACHE BOOL "Build Janus HTML Doxygen documentation")  
8 -mark_as_advanced(JANUS_BUILD_PP5_WRAPPER)  
9 -mark_as_advanced(JANUS_BUILD_DOCS)  
10 -add_subdirectory(janus)  
11 include_directories(janus/include) 6 include_directories(janus/include)
12 install(DIRECTORY janus/include DESTINATION .) 7 install(DIRECTORY janus/include DESTINATION .)
13 8
@@ -34,6 +29,14 @@ set_target_properties(openbr PROPERTIES @@ -34,6 +29,14 @@ set_target_properties(openbr PROPERTIES
34 target_link_libraries(openbr ${BR_THIRDPARTY_LIBS}) 29 target_link_libraries(openbr ${BR_THIRDPARTY_LIBS})
35 add_cppcheck(openbr) 30 add_cppcheck(openbr)
36 31
  32 +# Janus implementation
  33 +set(JANUS_BUILD_PP5_WRAPPER ${BR_WITH_PP5} CACHE BOOL "Build Janus implementation using PittPatt 5")
  34 +set(JANUS_BUILD_DOCS ${BR_BUILD_DOCUMENTATION} CACHE BOOL "Build Janus HTML Doxygen documentation")
  35 +mark_as_advanced(JANUS_BUILD_PP5_WRAPPER)
  36 +mark_as_advanced(JANUS_BUILD_DOCS)
  37 +set(JANUS_TEST_IMPLEMENTATION openbr)
  38 +add_subdirectory(janus)
  39 +
37 # Install 40 # Install
38 install(TARGETS openbr 41 install(TARGETS openbr
39 RUNTIME DESTINATION bin 42 RUNTIME DESTINATION bin
1 -Subproject commit 929bf94d6002d68b0d9c7a0b98a9c210d86bb7e6 1 +Subproject commit 7c80b694f871bb474267c75c38da63d785011939
openbr/janus.cpp
@@ -5,18 +5,21 @@ @@ -5,18 +5,21 @@
5 #include "janus.h" 5 #include "janus.h"
6 #include "openbr_plugin.h" 6 #include "openbr_plugin.h"
7 7
  8 +// Use the provided default implementation of some functions
  9 +#include "janus/src/janus.c"
  10 +
8 janus_error janus_initialize(const char *sdk_path, const char *model_file) 11 janus_error janus_initialize(const char *sdk_path, const char *model_file)
9 { 12 {
10 int argc = 1; 13 int argc = 1;
11 - const char *argv[1] = { "br" };  
12 - br::Context::initialize(argc, (char **)argv, sdk_path); 14 + const char *argv[1] = { "" };
  15 + br::Context::initialize(argc, (char**)argv, sdk_path);
13 QString algorithm = model_file; 16 QString algorithm = model_file;
14 if (algorithm.isEmpty()) algorithm = "FaceRecognition"; 17 if (algorithm.isEmpty()) algorithm = "FaceRecognition";
15 - br::Globals->setProperty("Algorithm", algorithm); 18 + br::Globals->algorithm = algorithm;
16 return JANUS_SUCCESS; 19 return JANUS_SUCCESS;
17 } 20 }
18 21
19 void janus_finalize() 22 void janus_finalize()
20 { 23 {
21 br::Context::finalize(); 24 br::Context::finalize();
22 -}  
23 \ No newline at end of file 25 \ No newline at end of file
  26 +}
openbr/janus_io.cpp 0 → 100644
  1 +#ifdef BR_LIBRARY
  2 + #define JANUS_LIBRARY
  3 +#endif
  4 +
  5 +// Use the provided OpenCV I/O implementation
  6 +#include "janus/src/opencv_io/opencv_io.cpp"