Skip to content

Commit 1806da7

Browse files
committed
Merge branch 'unstable' of git://github.com/nbourdau/libfreenect
Conflicts: examples/CMakeLists.txt Reviewed-by: Benn Snyder <[email protected]>
2 parents 7b9a5de + 55adb4a commit 1806da7

File tree

7 files changed

+116
-42
lines changed

7 files changed

+116
-42
lines changed

cmake_modules/SetupDirectories.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ MESSAGE (STATUS "${PROJECT_NAME} will be installed to ${CMAKE_INSTALL_PREFIX}")
1010
# Installation prefix for include files
1111
STRING (TOLOWER ${PROJECT_NAME} projectNameLower)
1212
SET (PROJECT_INCLUDE_INSTALL_DIR "include/${projectNameLower}")
13+
SET (PROJECT_MANPAGE_INSTALL_DIR "share/man")
1314

1415
IF (PROJECT_PROC_64BIT)
1516
SET (LIB_SUFFIX "64" CACHE STRING "Suffix for library installation directory")

examples/CMakeLists.txt

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ if (WIN32)
1818
include_directories(${THREADS_PTHREADS_INCLUDE_DIR})
1919
endif()
2020

21-
add_executable(glview glview.c)
22-
add_executable(regview regview.c)
23-
add_executable(hiview hiview.c)
24-
add_executable(chunkview chunkview.c)
21+
add_executable(freenect-glview glview.c)
22+
add_executable(freenect-regview regview.c)
23+
add_executable(freenect-hiview hiview.c)
24+
add_executable(freenect-chunkview chunkview.c)
2525
if(BUILD_AUDIO)
26-
add_executable(wavrecord wavrecord.c)
27-
add_executable(micview micview.c)
26+
add_executable(freenect-wavrecord wavrecord.c)
27+
add_executable(freenect-micview micview.c)
2828
endif()
2929

3030
if (BUILD_C_SYNC)
31-
add_executable(glpclview glpclview.c)
32-
add_executable(tiltdemo tiltdemo.c)
33-
add_executable(regtest regtest.c)
31+
add_executable(freenect-glpclview glpclview.c)
32+
add_executable(freenect-tiltdemo tiltdemo.c)
33+
add_executable(freenect-regtest regtest.c)
3434
endif()
3535

3636
# We need to include libfreenect_sync.h for glpclview
@@ -39,18 +39,18 @@ include_directories (../wrappers/c_sync/)
3939
# Mac just has everything already
4040
if(APPLE)
4141
set(CMAKE_EXE_LINKER_FLAGS "-framework OpenGL -framework GLUT")
42-
target_link_libraries(glview freenect)
43-
target_link_libraries(regview freenect)
44-
target_link_libraries(hiview freenect)
45-
target_link_libraries(chunkview freenect)
42+
target_link_libraries(freenect-glview freenect)
43+
target_link_libraries(freenect-regview freenect)
44+
target_link_libraries(freenect-hiview freenect)
45+
target_link_libraries(freenect-chunkview freenect)
4646
if (BUILD_AUDIO)
47-
target_link_libraries(wavrecord freenect)
48-
target_link_libraries(micview freenect)
47+
target_link_libraries(freenect-wavrecord freenect)
48+
target_link_libraries(freenect-micview freenect)
4949
endif()
5050
if (BUILD_C_SYNC)
51-
target_link_libraries(glpclview freenect_sync)
52-
target_link_libraries(tiltdemo freenect_sync)
53-
target_link_libraries(regtest freenect_sync)
51+
target_link_libraries(freenect-glpclview freenect_sync)
52+
target_link_libraries(freenect-tiltdemo freenect_sync)
53+
target_link_libraries(freenect-regtest freenect_sync)
5454
endif()
5555
# Linux, not so much
5656
else()
@@ -61,32 +61,31 @@ else()
6161

6262
include_directories(${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR} ${USB_INCLUDE_DIRS})
6363

64-
target_link_libraries(glview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
65-
target_link_libraries(regview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
66-
target_link_libraries(hiview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
67-
target_link_libraries(chunkview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
64+
target_link_libraries(freenect-glview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
65+
target_link_libraries(freenect-regview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
66+
target_link_libraries(freenect-hiview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
67+
target_link_libraries(freenect-chunkview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
6868
if (BUILD_AUDIO)
69-
target_link_libraries(wavrecord freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
70-
target_link_libraries(micview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
69+
target_link_libraries(freenect-wavrecord freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
70+
target_link_libraries(freenect-micview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
7171
endif()
7272
if (BUILD_C_SYNC)
73-
target_link_libraries(glpclview freenect_sync ${OPENGL_LIBRARIES} ${GLUT_LIBRARY}
73+
target_link_libraries(freenect-glpclview freenect_sync ${OPENGL_LIBRARIES} ${GLUT_LIBRARY}
7474
${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
75-
target_link_libraries(tiltdemo freenect_sync ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
76-
target_link_libraries(regtest freenect_sync ${CMAKE_THREAD_LIBS_INIT})
75+
target_link_libraries(freenect-tiltdemo freenect_sync ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
76+
target_link_libraries(freenect-regtest freenect_sync ${CMAKE_THREAD_LIBS_INIT})
7777
endif()
7878
endif()
7979

80-
81-
install (TARGETS glview regview hiview chunkview
80+
install (TARGETS freenect-glview freenect-regview freenect-hiview freenect-chunkview
8281
DESTINATION bin)
8382

8483
if (BUILD_C_SYNC)
85-
install (TARGETS glpclview tiltdemo
84+
install (TARGETS freenect-glpclview freenect-tiltdemo
8685
DESTINATION bin)
8786
endif()
8887

8988
if (BUILD_AUDIO)
90-
install (TARGETS wavrecord DESTINATION bin)
91-
install (TARGETS micview DESTINATION bin)
89+
install (TARGETS freenect-wavrecord DESTINATION bin)
90+
install (TARGETS freenect-micview DESTINATION bin)
9291
endif()

fakenect/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ target_link_libraries(fakenect ${MATH_LIB})
1313
install (TARGETS fakenect
1414
DESTINATION "${PROJECT_LIBRARY_INSTALL_DIR}/fakenect")
1515

16-
add_executable(record record.c)
17-
target_link_libraries(record freenect)
18-
install (TARGETS record
16+
add_executable(fakenect-record record.c)
17+
target_link_libraries(fakenect-record freenect m)
18+
install (TARGETS fakenect-record
1919
DESTINATION bin)
2020

2121
CONFIGURE_FILE("fakenect.sh.in"
@@ -24,3 +24,6 @@ CONFIGURE_FILE("fakenect.sh.in"
2424
install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fakenect.sh
2525
DESTINATION bin
2626
RENAME fakenect)
27+
28+
install(FILES fakenect.1 fakenect-record.1
29+
DESTINATION ${PROJECT_MANPAGE_INSTALL_DIR}/man1)

fakenect/fakenect-record.1

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
.TH FAKENECT-RECORD 1 2012-01-29 "libfreenect" "libfreenect manual"
2+
.SH NAME
3+
fakenect-record - program to save dumps from kinect to file
4+
.SH SYNOPSIS
5+
.SY fakenect-record
6+
.OP \-h
7+
.OP \-ffmpeg
8+
.OP \-ffmpeg-opts \fIoptions\fP
9+
.I outputdir
10+
.br
11+
.SH DESCRIPTION
12+
.LP
13+
\fBfakenect-record\fP dumps the output of the kinect in \fIoutputdir\fP
14+
folder. It saves the acceleration, depth, and rgb data as individual files
15+
with names in the form "TYPE-CURRENTIME-TIMESTAMP" where:
16+
.IP " *" 3
17+
TYPE is either (a)ccel, (d)epth, or (r)gb
18+
.IP " *" 3
19+
TIMESTAMP corresponds to the timestamp associated with the observation (or
20+
in the case of accel, the last timestamp seen)
21+
.IP " *" 3
22+
CURRENTTIME corresponds to a floating point version of the time in seconds.
23+
.LP
24+
The purpose of storing the current time is so that delays can
25+
be recreated exactly as they occurred. For RGB and DEPTH the dump is just
26+
the entirety of the data provided in PPM and PGM formats respectively (just
27+
a 1 line header above the raw dump). For ACCEL, the dump is the
28+
"freenect_raw_tilt_state". Only the front part of the file name is used,
29+
with the rest left undefined (extension, extra info, etc).
30+
.LP
31+
A file called INDEX.txt is also output with all of the filenames local to
32+
that directory to simplify the format (e.g., no need to read the directory
33+
structure).
34+
.LP
35+
Once started, the program will continue to acquire data from the kinect.
36+
When you want to stop it, hit Ctrl-C and the signal will be caught, runloop
37+
stopped, and everything will be stored cleanly.
38+
.SH OPTIONS
39+
.TP
40+
.B \-ffmpeg
41+
If present, send the the video stream to ffmpeg
42+
.
43+
.TP
44+
.B \-ffmpeg-opts \fIoptions\fP
45+
When using ffmpeg, specify the options to be used with it. If unspecified,
46+
it will use the options "\-aspect 4:3 \-r 20 \-vcodec msmpeg4 \-b 30000k"
47+
.
48+
.TP
49+
.B \-h
50+
Display the command-line help
51+
.SH "SEE ALSO"
52+
.BR fakenect (1)
53+

fakenect/fakenect.1

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.TH FAKENECT 1 2012-01-29 "libfreenect" "libfreenect manual"
2+
.SH NAME
3+
fakenect - Run a program by faking the Kinect
4+
.SH SYNOPSIS
5+
.SY fakenect
6+
.I database
7+
.I application
8+
.I args
9+
.br
10+
.SH DESCRIPTION
11+
.LP
12+
\fBfakenect\fP runs \fIapplication\fP with the arguments \fIargs\fP using
13+
the data contained in the folder \fIdatabase\fP. These data should have been
14+
recorded using \fIfakenect-record\fP(1).
15+
.SH "SEE ALSO"
16+
.BR fakenect-record (1)
17+
18+

wrappers/cpp/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ endif()
1414

1515
include_directories(.)
1616

17-
add_executable(cppview cppview.cpp)
17+
add_executable(freenect-cppview cppview.cpp)
1818

1919
# Mac just has everything already
2020
if(APPLE)
2121
set(CMAKE_EXE_LINKER_FLAGS "-framework OpenGL -framework GLUT")
22-
target_link_libraries(cppview freenect)
22+
target_link_libraries(freenect-cppview freenect)
2323
else()
2424
find_package(Threads REQUIRED)
2525
find_package(OpenGL REQUIRED)
2626
find_package(GLUT REQUIRED)
2727

2828
include_directories(${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR} ${USB_INCLUDE_DIRS})
2929

30-
target_link_libraries(cppview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
30+
target_link_libraries(freenect-cppview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
3131
endif()
3232

33-
install (TARGETS cppview
33+
install (TARGETS freenect-cppview
3434
DESTINATION bin)
3535

3636
ENDIF()

wrappers/opencv/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ install (TARGETS freenect_cv
1616
install (FILES "libfreenect_cv.h"
1717
DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
1818

19-
add_executable(cvdemo cvdemo.c)
20-
target_link_libraries(cvdemo freenect freenect_sync freenect_cv ${OpenCV_LIBS})
21-
install (TARGETS cvdemo
19+
add_executable(freenect-cvdemo cvdemo.c)
20+
target_link_libraries(freenect-cvdemo freenect freenect_sync freenect_cv ${OpenCV_LIBS})
21+
install (TARGETS freenect-cvdemo
2222
DESTINATION bin)

0 commit comments

Comments
 (0)