Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ set( VERSION 1.0.0 )
set( PACKAGE_NAME ${CMAKE_PROJECT_NAME} )

set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR} )
find_path(OpenCV_DIR NAMES opencv-config.cmake OpenCVConfig.cmake PATH_SUFFIXES lib/cmake lib)
find_package( OpenCV REQUIRED COMPONENTS core imgproc highgui )
find_package( fftw REQUIRED )
find_package( freenect REQUIRED )
MESSAGE("${FREENECT_INCLUDE_DIR}")
include_directories( ${FREENECT_INCLUDE_DIR} )

set( CMAKE_BUILD_TYPE Debug )
set( CMAKE_C_FLAGS_DEBUG "-g" )
Expand Down
14 changes: 7 additions & 7 deletions Findfreenect.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
# FREENECT_LIBRARIES
#

set( LIBRARY_PATHS "/usr /usr/local /opt/local /sw" )
#set( LIBRARY_PATHS "/usr /usr/local /opt/local /sw" )

find_path( FREENECT_INCLUDE_DIR
NAMES libfreenect_sync.h
${LIBRARY_PATHS}
PATH_SUFFIEXS include include/libfreenect
# ${LIBRARY_PATHS}
PATH_SUFFIXES include include/libfreenect
DOC "The dicrectory where libfreenect_sync.h resides"
)

find_library( FREENECT_SYNC_LIBRARIES
NAMES freenect_sync
${LIBRARY_PATHS}
PATH_SUFFIES lib lib64
# ${LIBRARY_PATHS}
PATH_SUFFIXES lib lib64
DOC "The freenect_sync library"
)

find_library( FREENECT_CV_LIBRARIES
NAMES freenect_cv
${LIBRARY_PATHS}
PATH_SUFFIEXS lib lib64
# ${LIBRARY_PATHS}
PATH_SUFFIXES lib lib64
DOC "The freenect_cv library"
)

Expand Down
2 changes: 1 addition & 1 deletion demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include_directories( "${CMAKE_SOURCE_DIR}/include" )

add_executable( demoposture demoposture.c)
target_link_libraries( demoposture body hand posture
${OpenCV_LIBS}
${OpenCV_LIBRARIES}
${FREENECT_LIBRARIES}
)

Expand Down
2 changes: 1 addition & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project( tools )

include_directories( "${CMAKE_SOURCE_DIR}/include" )

set( POSTURE_TOOLS testposture trainposture )
set( POSTURE_TOOLS testposture trainposture ) # testposture requires _cvFontQt _cvAddText
foreach( PROG ${POSTURE_TOOLS} )
add_executable( ${PROG} "${PROG}.c" )
target_link_libraries( ${PROG} body hand posture
Expand Down
10 changes: 5 additions & 5 deletions tools/testposture.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int main (int argc, char *argv[])
int num, count=0;
char *w1 = "rgb", *w2 = "number";
char buff[5];
CvFont font[N];
//CvFont font[N];
CvScalar color[N];

parse_args(argc,argv);
Expand All @@ -79,9 +79,9 @@ int main (int argc, char *argv[])
color[4] = CV_RGB(0,255,255);

int i;
for (i=0; i<N; i++)
font[i] = cvFontQt("Helvetica", 200, color[i], CV_FONT_NORMAL,
CV_STYLE_NORMAL, 0);
//for (i=0; i<N; i++)
// font[i] = cvFontQt("Helvetica", 200, color[i], CV_FONT_NORMAL,
// CV_STYLE_NORMAL, 0);

cvNamedWindow(w1, WT);
cvNamedWindow(w2, WT);
Expand Down Expand Up @@ -109,7 +109,7 @@ int main (int argc, char *argv[])
cvMoveWindow(w1, 640, 0);
sprintf(buff, "%d", p+1);
cvZero(number);
cvAddText(number, buff, cvPoint(80,190), &(font[p]));
//cvAddText(number, buff, cvPoint(80,190), &(font[p]));
cvShowImage(w2, number);
cvMoveWindow(w2, 0, 530);

Expand Down