Skip to content

Commit

Permalink
support for the trax v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Vojir committed May 16, 2017
1 parent b1da5ab commit 69cec49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
14 changes: 6 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ add_executable(kcf_vot main_vot.cpp vot.hpp)
target_link_libraries(kcf_vot ${OpenCV_LIBS} kcf)

# Try to find TraX header and library ...
FIND_FILE(TRAX_HEADER NAMES trax.h)
IF (EXISTS ${TRAX_HEADER})
GET_FILENAME_COMPONENT(TRAX_DIR ${TRAX_HEADER} DIRECTORY)
ADD_DEFINITIONS(-DTRAX) # Added to enable TraX protocol support
LINK_DIRECTORIES(${TRAX_DIR}) # Add library directory
INCLUDE_DIRECTORIES(${TRAX_DIR}) # Add includes directory
FIND_PACKAGE(trax REQUIRED COMPONENTS core opencv)
IF (trax_FOUND)
MESSAGE(STATUS "Trax protocol found: building kcf_trax")
INCLUDE_DIRECTORIES(${TRAX_INCLUDE_DIRS})
LINK_DIRECTORIES(${TRAX_LIBRARY_DIRS})

add_executable(kcf_trax main_trax.cpp)
target_link_libraries(kcf_trax ${OpenCV_LIBS} kcf trax trax_opencv)
target_link_libraries(kcf_trax ${OpenCV_LIBS} kcf ${TRAX_LIBRARIES})
ENDIF()


4 changes: 1 addition & 3 deletions main_trax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ int main()
cv::Mat image;
cv::Rect rectangle;

trax::Server handle(trax::Configuration(TRAX_IMAGE_PATH | TRAX_IMAGE_MEMORY | TRAX_IMAGE_BUFFER, TRAX_REGION_RECTANGLE), trax_no_log);

std::cout << handle.configuration().format_region << " " << TRAX_SUPPORTS(handle.configuration().format_region, TRAX_REGION_POLYGON) << std::endl;
trax::Server handle(trax::Metadata(TRAX_REGION_RECTANGLE, TRAX_IMAGE_PATH), trax_no_log);

while (true) {
trax::Properties prop;
Expand Down

0 comments on commit 69cec49

Please sign in to comment.