Skip to content
Snippets Groups Projects
Commit 6a926dec authored by Matthieu Herrb's avatar Matthieu Herrb
Browse files

[wip/libfreenect] update to commit 2ea3eb.

Adds IR image support, an OpenCV wrapper and a synchronous API.

Initial Work done by Nizar, additional patches by me.

For now the python bindings are not built (they depend on cython).
parent d991b1c9
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,8 @@
# Created: Matthieu Herrb on Sat, 13 Nov 2010
#
COMMIT= 539b28
PKG_VERSION= 20101124.${COMMIT}
COMMIT= 2ea3eb
PKG_VERSION= 20110118.${COMMIT}
DISTNAME= libfreenect-${PKG_VERSION}
CATEGORIES= hardware image
MASTER_SITES= https://github.com/OpenKinect/libfreenect.git@${COMMIT}
......@@ -16,6 +16,19 @@ LICENSE= apache-2.0
USE_LANGUAGES= c c++ python
#option for opencv wrapping and demo building
PKG_SUPPORTED_OPTIONS+= opencv
PKG_SUGGESTED_OPTIONS-= opencv
PKG_OPTION_DESCR.opencv= Build OpenCV wrapper and demo.
define PKG_OPTION_SET.opencv
CMAKE_ARGS+= -DBUILD_CV=ON -DCMAKE_C_CFLAGS=-I${ROBOTPKG_BASE}/include
include ../../image/opencv/depend.mk
CONFIGURE_ENV+=
endef
define PKG_OPTION_UNSET.opencv
CMAKE_ARGS+= -DBUILD_CV=OFF
endef
include ../../pkgtools/install-sh/depend.mk
include ../../mk/sysdep/cmake.mk
include ../../mk/sysdep/libXmu.mk
......
@comment Wed Nov 24 18:58:39 CET 2010
@comment Tue Jan 18 16:28:19 CET 2011
bin/cppview
${PLIST.opencv}bin/cvdemo
bin/glpclview
bin/glview
bin/tiltdemo
include/libfreenect.hpp
include/libfreenect/libfreenect.h
include/libfreenect/libfreenect.hpp
${PLIST.opencv}include/libfreenect/libfreenect_cv.h
include/libfreenect/libfreenect_sync.h
lib/fakenect/libfreenect.so
lib/fakenect/libfreenect.so.0.0
lib/fakenect/libfreenect.so.0.0.1
lib/libfreenect.a
lib/libfreenect.so
lib/libfreenect.so.0.0
lib/libfreenect.so.0.0.1
${PLIST.opencv}lib/libfreenect_cv.so
${PLIST.opencv}lib/libfreenect_cv.so.0.0
${PLIST.opencv}lib/libfreenect_cv.so.0.0.1
lib/libfreenect_sync.a
lib/libfreenect_sync.so
lib/libfreenect_sync.so.0.0
lib/libfreenect_sync.so.0.0.1
lib/pkgconfig/libfreenect.pc
SHA1 (libfreenect-20101124.539b28.tar.gz) = 535471bb18fda71da2bf8378e946a6a44474cc2c
RMD160 (libfreenect-20101124.539b28.tar.gz) = 8781e63b4386b981fdcc3bc8ec52c858467df359
SHA1 (libfreenect-20110118.2ea3eb.tar.gz) = 3b5f6cabc165db6fff5dd15cc82f3bdc641fc1ca
RMD160 (libfreenect-20110118.2ea3eb.tar.gz) = f34d8b3435b87ec3a5d16093477e93bd96d06d91
SHA1 (patch-aa) = 006bf4a171363f855feec601819aa4e518a93360
SHA1 (patch-ab) = 27a3f0078ad1226f82266a8c807de5fbbf8b5eb8
SHA1 (patch-ac) = df1914aa0e0bf24dd2c2fcc2621a051c1aa08c69
Add pkgconfig rules to probe for opencv
--- wrappers/opencv/CMakeLists.txt~ 2011-01-06 06:03:39.000000000 +0100
+++ wrappers/opencv/CMakeLists.txt 2011-01-20 17:24:38.937287000 +0100
@@ -1,19 +1,29 @@
######################################################################################
# OpenCV Interface
######################################################################################
+find_package(PkgConfig)
+pkg_check_modules(OPENCV2 REQUIRED "opencv")
+
add_library (freenect_cv SHARED libfreenect_cv.c)
+
+add_executable(cvdemo cvdemo.c)
+
+set_target_properties(freenect_cv cvdemo PROPERTIES COMPILE_FLAGS "${OPENCV2_CFLAGS}")
+
set_target_properties (freenect_cv PROPERTIES
VERSION ${PROJECT_VER}
SOVERSION ${PROJECT_APIVER})
-target_link_libraries (freenect_cv freenect_sync cv)
+
+target_link_libraries (freenect_cv freenect_sync ${OPENCV2_LDFLAGS})
install (TARGETS freenect_cv
DESTINATION "${PROJECT_LIBRARY_INSTALL_DIR}")
install (FILES "libfreenect_cv.h"
DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
-add_executable(cvdemo cvdemo.c)
-target_link_libraries(cvdemo freenect freenect_sync freenect_cv cv highgui)
+
+
+target_link_libraries(cvdemo freenect freenect_sync freenect_cv "${OPENCV2_LDFLAGS}")
install (TARGETS cvdemo
- DESTINATION bin)
\ No newline at end of file
+ DESTINATION bin)
Pkgconfig for opencv produces -I${prefix}/include/opencv, zap opencv/ from
include directives and include cv.h only once.
--- wrappers/opencv/cvdemo.c~ 2011-01-06 06:03:39.000000000 +0100
+++ wrappers/opencv/cvdemo.c 2011-01-20 16:58:02.937129000 +0100
@@ -1,7 +1,6 @@
-#include <opencv/cv.h>
-#include <opencv/highgui.h>
#include <stdio.h>
#include "libfreenect_cv.h"
+#include <highgui.h>
IplImage *GlViewColor(IplImage *depth)
{
Zap opencv/ from include directives.
--- wrappers/opencv/libfreenect_cv.h~ 2011-01-06 06:03:39.000000000 +0100
+++ wrappers/opencv/libfreenect_cv.h 2011-01-20 16:54:27.903830000 +0100
@@ -5,7 +5,7 @@
extern "C" {
#endif
-#include <opencv/cv.h>
+#include <cv.h>
IplImage *freenect_sync_get_depth_cv(int index);
IplImage *freenect_sync_get_rgb_cv(int index);
@@ -14,4 +14,4 @@
}
#endif
-#endif
\ No newline at end of file
+#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment