openkinect / libfreenect Goto Github PK
View Code? Open in Web Editor NEWDrivers and libraries for the Xbox Kinect device on Windows, Linux, and OS X
Home Page: http://openkinect.org
Drivers and libraries for the Xbox Kinect device on Windows, Linux, and OS X
Home Page: http://openkinect.org
This OpenKinect repository has moved to https://github.com/OpenKinect/libfreenect/. Do not fork or submit to this URL https://github.com/OpenKinect/openkinect/. See http://openkinect.org for details. Please join the mailing list: http://groups.google.com/group/openkinect/ or check in on IRC #OpenKinect on freenode.net.
I found a memory leak in the MacOS version of libusb. The fix can be found here: git://gist.github.com/707184.git
From original issue #40:
here is a patch for the C++ binding : http://yoda-jm.performous.org/freenect/0001-Added-C-API.patch This patch only depends on the STL and pthread
Pretty weird and I do not understand a thing about USB communication so I do not know if this bug belongs to another filed bug. However, it is easily reproduceable:
(I am using the latest "master"-build bdd9219)
Comment in glview.c the following lines of the function "freenect_threadfunc":
freenect_raw_tilt_state* state; freenect_update_tilt_state(f_dev); state = freenect_get_tilt_state(f_dev); double dx,dy,dz; freenect_get_mks_accel(state, &dx, &dy, &dz); printf("\r raw acceleration: %4d %4d %4d mks acceleration: %4f %4f %4f", state->accelerometer_x, state->accelerometer_y, state->accelerometer_z, dx, dy, dz);
Compile and see the giant bunch of invalid magic coming over the USB-line:
[...] [Stream 70] Expected max 1748 data bytes, but got 1908. Dropping... [Stream 70] Invalid magic 6f6d [Stream 70] Invalid magic ffff [Stream 70] Invalid magic ffff [Stream 70] Invalid magic ffff [Stream 70] Invalid magic d2aa [Stream 70] Invalid magic 85b0 [Stream 70] Invalid magic dbdb [Stream 70] Invalid magic ffff [Stream 70] Invalid magic ffff [Stream 70] Invalid magic ffff [Stream 70] Lost 12 packets [Stream 70] Lost too many packets, resyncing... [Stream 70] Expected max 1748 data bytes, but got 1908. Dropping... [Stream 70] Invalid magic ffff [Stream 70] Invalid magic 4cc9 [Stream 70] Invalid magic f77e [Stream 70] Invalid magic ffff [Stream 70] Invalid magic ffff [Stream 70] Invalid magic ffff [Stream 70] Invalid magic ffff [Stream 70] Invalid magic 52f2 [Stream 70] Invalid magic 0de1 [Stream 70] Invalid magic ced9 [Stream 70] Lost 11 packets [Stream 70] Lost too many packets, resyncing... [...]
The only necessary work around is to uncomment the two lines:
freenect_raw_tilt_state* state; freenect_update_tilt_state(f_dev);
If the tilt state is updated libfreenect is happy and receives valid packets. I assume this might have something to do with the usb-package alignment/ordering bug? In any case, I hope that this helps.
Happy new year to everyone!
It would be cool to be able to set if you want the kinect to do the horizontal flip on the images instead of doing it manually.
Something like:
/// Enumeration of image horizontal flip format typedef enum { HORZ_FLIP_OFF = 0x00, HORZ_FLIP_ON = 0x01 } freenect_hflip_format; ... int freenect_set_depth_hflip(freenect_device *dev, freenect_hflip_format fmt); int freenect_set_video_hflip(freenect_device *dev, freenect_hflip_format fmt);
By default it appears it does autoexposure, it would be good to be able to disable this and then manipulate gain and exposure manually...
For robotics / visual tracking, the ability to process input with low latency can save computation time and reduce perceptual aliasing, as well as improve closed loop reaction time. In this regard, a rolling shutter (such as that used by the Kinect RGB and IR camera) can offer an advantage.
It would be great if the libfreenect driver additionally offered access to the underlying image frame chunks for sequential processing.
Running glview on a fedora 14 system with ATI r600, depth image has only 2 or 3 colours, rgb image is completely white, and no I'm not stuck in a blizzard. Problem caused by incorrect param to glColour4f.
index f249238..fbdee4a 100644
--- a/examples/glview.c
+++ b/examples/glview.c
@@ -123,7 +123,7 @@ void DrawGLScene()
glTexImage2D(GL_TEXTURE_2D, 0, 3, 640, 480, 0, GL_RGB, GL_UNSIGNED_BYTE,
glBegin(GL_TRIANGLE_FAN);
- glColor4f(255.0f, 255.0f, 255.0f, 255.0f);
+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glTexCoord2f(0, 0); glVertex3f(0,0,0);
glTexCoord2f(1, 0); glVertex3f(640,0,0);
glTexCoord2f(1, 1); glVertex3f(640,480,0);
@@ -137,7 +137,7 @@ void DrawGLScene()
glTexImage2D(GL_TEXTURE_2D, 0, 1, 640, 480, 0, GL_LUMINANCE, GL_
glBegin(GL_TRIANGLE_FAN);
- glColor4f(255.0f, 255.0f, 255.0f, 255.0f);
+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glTexCoord2f(0, 0); glVertex3f(640,0,0);
glTexCoord2f(1, 0); glVertex3f(1280,0,0);
glTexCoord2f(1, 1); glVertex3f(1280,480,0);
Does freeenct work on powerpc? I have a tester trying ofxKinect (openframeworks freenect wrapper) on ppc and he's getting garbled images. Could this be a byte order problem?
The tutorial in http://openkinect.org/wiki/Code_Integration just mentions operations dealing with upstream master branch. Because most of the development has moved to unstable, it has sense to update the tutorial so that git newbies (the intended audience) have to do the process to rebase their changes to unstable instead of master.
Whatever recent changes were made to Glview.c, they have broken operation on OS X. I have recieved a report about this on my blog earlier so decided to investigate. Prior to me pulling down the recent version, GLView worked, but now it hangs with a white window (no image(s)) and the kinect's LED stays stuck on red.
Heres the console output I had:
Kinect camera test
Number of devices found: 1
GL thread
Failed to submit xfer 1: -99
Failed to submit xfer 2: -99
Failed to submit xfer 3: -99
Xfer error: 1
Failed to submit xfer 1: -99
Failed to submit xfer 2: -99
Failed to submit xfer 3: -99
Xfer error: 1
raw acceleration: -14 807 6 mks acceleration: -0.119739 9.662963 -0.119739^C
Hi, running the patch instructions as given in the readme don't work with the diff file right now. I am getting Hunk E2 FAILED at 1169, problem patching file libusb/os/darwin_usb.h patch unexpectedly ends in middle of line. It might be easier if the binary were just included with this tree, is the license incompatible?
Patch is available here
http://yoda-jm.performous.org/freenect/0002-Added-led-accelerometers-and-motor-tilt-setting-to-l.patch
Apply on current master. It merge in one patch work from different people
In Modules/FindUSB.cmake, where it has this:
find_library(USB_LIBRARY
NAMES usb-1.0
PATHS ${USB_PKGCONF_LIBRARY_DIRS}
)
add a conditional for OSX which allows it to search /usr/local/include/libusb-1.0/ as at the moment, this section fails on OSX.
my setup script currently patches this file, but this should not be necessary
For one application I'd like to be able to properly close the device and context and retrieve it again later so I need these functions implemented (use I get transfer errors when I try to reopen the device). The use case is that I have a C synchronous interface that lets the user ask for individual frames, when they do this a thin runloop is made in a separate thread. I have a function that closes the runloop, cleans up the context/device, and then joins the thread so that they can switch back to an asynch interface if they want. I can probably implement these myself but I was curious if anyone had already planned for it.
Added a non-blocking process events function freenect_process_events_timeout that essentially calls libusb_handle_events_timeout.
http://graphics.stanford.edu/~philkr/libfreenect-timeout.patch
We need to know how to turn the IR projector on and off, and what the minimum cycle time of the camera is in order to use multiple cascaded cameras possibly.
Hi guys,
Am I the only one experiencing problem with as3-server loosing a lot of packets while glview is working fine (fluid rendering) ?
This is a sample of what i got in loop in console when running the sample test_depth.swf with as3-server (same with test_rgb.swf) :
[Stream 70] Invalid magic ffff
[Stream 70] Invalid magic ffff
[Stream 70] Lost 1 packets
[Stream 70] Lost 18 packets
[Stream 70] Lost too many packets, resyncing...
I build a fresh libfreenect (2402fcd) with libusb from git://git.libusb.org/libusb.git patched with the platform/osx/libusb-osx-kinect.diff
I also try with patched libusb-7da756e but nothing better happens...
Short description of hardware : intel core i7, 8Go DDR3, intel HD graphics + nvidia geforce gt 330m, kinect is directly connected to mac, no hub.
and software : mac osx 10.6.5, cmake 2.8.3, gcc 4.2.1
AS3 samples built with flex sdk 4.1.0 and run with flash player 10.1.102.64
Any idea or help would be welcome, thx !
RIght now we're going on visual cues to figure out whether things are going fast enough. We need a quick cross platform FPS function to make sure what quality we're getting where on each platform.
This will enable, at least, nice C++ binding.
Patch is available here :
http://yoda-jm.performous.org/0002-Added-user-data-to-freenect-API.patch
According to Carl Kenner, the wiimote and PSMove accelerometer calibration is stored on the hardware. Is there a control transfer available to the motor device that would send back this info?
When running cppview, upon exit it gives either a segfault or a
pure virtual method called
terminate called without an active exception
I've isolated it to the following function calls:
freenect_stop_depth
write_register
send_cmd
fnusb_control <- It doesn't always segfault on the first call, but there is a loop that calls this function so if it doesn't seg fault at the first call, it will eventually
I can't exactly tell what call of fnusb_control causes the segfault but it pretty much does it every time.
I'm running this on
Ubuntu 10.10 64bit
Whatever recent changes were made to Glview.c, they have broken operation on OS X. I have recieved a report about this on my blog earlier so decided to investigate. Prior to me pulling down the recent version, GLView worked, but now it hangs with a white window (no image(s)) and the kinect's LED stays stuck on red.
Heres the console output I had:
Kinect camera test
Number of devices found: 1
GL thread
Failed to submit xfer 1: -99
Failed to submit xfer 2: -99
Failed to submit xfer 3: -99
Xfer error: 1
Failed to submit xfer 1: -99
Failed to submit xfer 2: -99
Failed to submit xfer 3: -99
Xfer error: 1
raw acceleration: -14 807 6 mks acceleration: -0.119739 9.662963 -0.119739^C
as3-server.c uses the JPEG library instead of jpeg.
Additionally it used powf, which is not part of my math.h.
never mind! found it
Lots of people that don't use git may be wanting to work on this, especially specialists in non-software fields. Find a simple git tutorial and put in wiki.
The current implementation still does not reach 30 Hz on MacOS. This is due to bad scheduling of USB transfers in libusb. A fix can be found at http://www.informatik.uni-bremen.de/~roefer/libusb/libusb-osx-kinect.diff .
In camera.c, I use PKTS_PER_XFER = 128, NUM_XFERS = 4. There are a few rules: PKTS_PER_XFER * NUM_XFERS <= 1000, PKTS_PER_XFER % 8 == 0.Initialization seems to work better when send_init() is called before the transfer packets are submitted, i.e. before the loop in cams_init().
So as to give smaller frame size when needing to quickly stream it elsewhere, e.g. to disk or across network.
On my Ubuntu system, the c headers are installed here:
/usr/local/include/libfreenect/libfreenect.h
/usr/local/include/libfreenect/libfreenect_sync.h
Including libfreenect_sync.h gives the following error:
/usr/local/include/libfreenect/libfreenect_sync.h:29:25: fatal error: libfreenect.h: No such file or directory
This is because libfreenect_sync.h has:
#include <libfreenect.h>
this should be:
#include <libfreenect/libfreenect.h>
or:
#include "libfreenect.h"
(I'm not sure which of the 2 would be best c practice)
Why no work on Windows Driver here?
On http://ajaxorg.posterous.com/ was one.
Hello all,
The debug build process on windows machines using MSVC is broken. The problem lies in the position of the include of the header of "map" with respect to the debug new operator. Have a look at http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/a6a148ed-aff1-4ec0-95d2-a82cd4c29cbb for more detail. It can be fixed by adding the line #include in libusbemu.cpp on line 32.
Since I am not familiar with GIT, i hope somebody can put this fix in the source.
Sincerely,
Gao Han/Rain_King
since we dont have a kernel module, i have no idea how to fix that or if its possible to fix at all..
(I am running ubuntu 10.4 on two machines)
Hi,
i got erros while compiling libfreenect on windows with VS2010 and i cant find any informations around. Does someone have an idea ?
Some problem with "time.h" and other syntax issue ....
here is compilation report ...
3>------ Build started: Project: fakenect, Configuration: Debug Win32 ------
2>....\libfreenect\fakenect\record.c(37): warning C4255: 'get_time' : no function prototype given: converting '()' to '(void)'
2>....\libfreenect\fakenect\record.c(39): error C2079: 'cur' uses undefined struct 'timeval'
2>....\libfreenect\fakenect\record.c(40): warning C4013: 'gettimeofday' undefined; assuming extern returning int
2>....\libfreenect\fakenect\record.c(41): error C2224: left of '.tv_sec' must have struct/union type
2>....\libfreenect\fakenect\record.c(41): error C2224: left of '.tv_usec' must have struct/union type
2>....\libfreenect\fakenect\record.c(41): warning C4033: 'get_time' must return a value
2>....\libfreenect\fakenect\record.c(55): error C2065: 'null' : undeclared identifier
2>....\libfreenect\fakenect\record.c(55): warning C4047: 'initializing' : 'FILE _' differs in levels of indirection from 'int'
2>....\libfreenect\fakenect\record.c(98): error C2275: 'freenect_raw_tilt_state' : illegal use of this type as an expression
2> F:\SoftsW7\Kinect\libfreenect\include\libfreenect.h(107) : see declaration of 'freenect_raw_tilt_state'
3>Build started 02/02/2011 12:47:40.
2>....\libfreenect\fakenect\record.c(98): error C2065: 'state' : undeclared identifier
2>....\libfreenect\fakenect\record.c(100): error C2065: 'state' : undeclared identifier
2>....\libfreenect\fakenect\record.c(100): warning C4047: '=' : 'int' differs in levels of indirection from 'freenect_raw_tilt_state *'
2>....\libfreenect\fakenect\record.c(101): error C2065: 'state' : undeclared identifier
2>....\libfreenect\fakenect\record.c(101): warning C4022: 'dump' : pointer mismatch for actual parameter 3
2>....\libfreenect\fakenect\record.c(101): error C2065: 'state' : undeclared identifier
2>....\libfreenect\fakenect\record.c(101): error C2100: illegal indirection
2>....\libfreenect\fakenect\record.c(111): warning C4255: 'init' : no function prototype given: converting '()' to '(void)'
2>....\libfreenect\fakenect\record.c(149): warning C4013: 'mkdir' undefined; assuming extern returning int
2>....\libfreenect\fakenect\record.c(149): error C2065: 'S_IRWXU' : undeclared identifier
2>....\libfreenect\fakenect\record.c(149): error C2065: 'S_IRWXG' : undeclared identifier
2>....\libfreenect\fakenect\record.c(149): error C2065: 'S_IRWXO' : undeclared identifier
2>....\libfreenect\fakenect\record.c(151): error C2143: syntax error : missing ';' before 'type'
2>....\libfreenect\fakenect\record.c(152): error C2065: 'fn' : undeclared identifier
2>....\libfreenect\fakenect\record.c(152): warning C4047: 'function' : 'char *' differs in levels of indirection from 'int'
2>....\libfreenect\fakenect\record.c(152): warning C4024: 'sprintf' : different types for formal and actual parameter 1
2>....\libfreenect\fakenect\record.c(153): error C2065: 'fn' : undeclared identifier
2>....\libfreenect\fakenect\record.c(153): warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
2>....\libfreenect\fakenect\record.c(153): warning C4024: 'fopen' : different types for formal and actual parameter 1
2>....\libfreenect\fakenect\record.c(158): error C2065: 'fn' : undeclared identifier
2>....\libfreenect\fakenect\record.c(158): warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
2>....\libfreenect\fakenect\record.c(158): warning C4024: 'fopen' : different types for formal and actual parameter 1
2>....\libfreenect\fakenect\record.c(160): error C2065: 'fn' : undeclared identifier
2>....\libfreenect\fakenect\record.c(163): error C2065: 'fn' : undeclared identifier
2>....\libfreenect\fakenect\record.c(163): warning C4022: 'free' : pointer mismatch for actual parameter 1
3>InitializeBuildStatus:
3> Touching "fakenect.dir\Debug\fakenect.unsuccessfulbuild".
3>CustomBuild:
3> All outputs are up-to-date.
3>ClCompile:
3> fakenect.c
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\wchar.h(109): warning C4820: '_wfinddata64i32_t' : '4' bytes padding added after data member '_wfinddata64i32_t::attrib'
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\wchar.h(114): warning C4820: '_wfinddata64i32_t' : '4' bytes padding added after data member '_wfinddata64i32_t::name'
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\wchar.h(118): warning C4820: '_wfinddata64_t' : '4' bytes padding added after data member '_wfinddata64_t::attrib'
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\wchar.h(488): warning C4820: '_stat32' : '2' bytes padding added after data member '_stat32::st_gid'
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\wchar.h(504): warning C4820: 'stat' : '2' bytes padding added after data member 'stat::st_gid'
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\wchar.h(520): warning C4820: '_stat32i64' : '2' bytes padding added after data member '_stat32i64::st_gid'
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\wchar.h(521): warning C4820: '_stat32i64' : '4' bytes padding added after data member '_stat32i64::st_rdev'
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\wchar.h(525): warning C4820: '_stat32i64' : '4' bytes padding added after data member '_stat32i64::st_ctime'
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\wchar.h(534): warning C4820: '_stat64i32' : '2' bytes padding added after data member '_stat64i32::st_gid'
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\wchar.h(548): warning C4820: '_stat64' : '2' bytes padding added after data member '_stat64::st_gid'
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\wchar.h(549): warning C4820: '_stat64' : '4' bytes padding added after data member 'stat64::st_rdev'
3>F:\SoftsW7\Kinect\libfreenect\include\libfreenect.h(106): warning C4820: '' : '1' bytes padding added after data member '::tilt_angle'
3>....\libfreenect\fakenect\fakenect.c(52): warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
3>....\libfreenect\fakenect\fakenect.c(53): warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
3>....\libfreenect\fakenect\fakenect.c(55): error C3861: 'sleep': identifier not found
3>....\libfreenect\fakenect\fakenect.c(56): error C3861: 'usleep': identifier not found
3>....\libfreenect\fakenect\fakenect.c(61): error C2079: 'cur' uses undefined struct 'get_time::timeval'
3>....\libfreenect\fakenect\fakenect.c(62): error C3861: 'gettimeofday': identifier not found
3>....\libfreenect\fakenect\fakenect.c(63): error C2228: left of '.tv_sec' must have class/struct/union
3> type is 'int'
3>....\libfreenect\fakenect\fakenect.c(63): error C2228: left of '.tv_usec' must have class/struct/union
3> type is 'int'
3>....\libfreenect\fakenect\fakenect.c(70): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
3>....\libfreenect\fakenect\fakenect.c(73): warning C4365: 'argument' : conversion from 'int' to 'size_t', signed/unsigned mismatch
3>....\libfreenect\fakenect\fakenect.c(73): error C2440: '=' : cannot convert from 'void *' to 'char *'
3> Conversion from 'void' to pointer to non-'void' requires an explicit cast
3>....\libfreenect\fakenect\fakenect.c(77): warning C4365: 'argument' : conversion from 'int' to 'size_t', signed/unsigned mismatch
3>....\libfreenect\fakenect\fakenect.c(77): error C2440: '=' : cannot convert from 'void ' to 'char *'
3> Conversion from 'void' to pointer to non-'void' requires an explicit cast
3>....\libfreenect\fakenect\fakenect.c(97): warning C4365: 'initializing' : conversion from 'size_t' to 'int', signed/unsigned mismatch
3>....\libfreenect\fakenect\fakenect.c(98): warning C4365: 'argument' : conversion from 'int' to 'size_t', signed/unsigned mismatch
3>....\libfreenect\fakenect\fakenect.c(98): error C2440: 'initializing' : cannot convert from 'void ' to 'char *'
3> Conversion from 'void' to pointer to non-'void' requires an explicit cast
3>....\libfreenect\fakenect\fakenect.c(99): error C3861: 'snprintf': identifier not found
3>....\libfreenect\fakenect\fakenect.c(107): warning C4365: '=' : conversion from 'int' to 'unsigned int', signed/unsigned mismatch
3>....\libfreenect\fakenect\fakenect.c(109): error C2440: '=' : cannot convert from 'void ' to 'char *'
3> Conversion from 'void' to pointer to non-'void' requires an explicit cast
3>....\libfreenect\fakenect\fakenect.c(126): warning C4365: 'initializing' : conversion from 'size_t' to 'int', signed/unsigned mismatch
3>....\libfreenect\fakenect\fakenect.c(127): warning C4365: 'argument' : conversion from 'int' to 'size_t', signed/unsigned mismatch
3>....\libfreenect\fakenect\fakenect.c(127): error C2440: 'initializing' : cannot convert from 'void ' to 'char *'
3> Conversion from 'void' to pointer to non-'void' requires an explicit cast
2>
2>Build FAILED.
2>
2>Time Elapsed 00:00:00.87
3>....\libfreenect\fakenect\fakenect.c(128): error C3861: 'snprintf': identifier not found
The License header in the source files contains the line:
This file is not there...
I wrote a small script that uses "git log" to generate a CONTRIB file.
Hi,
here is a patch for the C++ binding : http://yoda-jm.performous.org/freenect/0001-Added-C-API.patch
This patch only depends on the STL and pthread
"""
configure_file(
"${CMAKE_SOURCE_DIR}/Modules/UninstallTarget.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/UninstallTarget.cmake"
IMMEDIATE @only)
""""
These lines mean that I cannot include this package as a subdir of a larger CMake build, for it now looks at a higher level.
Placing a hand in close proximity to the lens causes the frame rate to drop considerably in glview. This issue only occurs when the lens is entirely or almost entirely obscured by a close object.
I've been trying to use the python wrapper in Blender 2.49, which uses Python 2.5, and have run into a few problems. When the python wrapper is built with Python 2.5.4 nm -u shows all the _freenect symbols are undefined. The problem doesn't occur in Python 2.6. I'm seeing this on Mac OS 10.6.5
The video image horizontal flip is currently set to off, but the depth image is not. If running another kinect lib (openni) that changes this value for the depth, the value is not reset by freeenct and the RGB and depth images can be become unmatched.
The following should be added to line 759 in cameras.c:
write_register(dev, 0x17, 0x00); // disable Hflip
Streaming points and images I get the following.
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
Hello all,
The debug build process on windows machines using MSVC is broken. The problem lies in the position of the include of the header of "map" with respect to the debug new operator. Have a look at http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/a6a148ed-aff1-4ec0-95d2-a82cd4c29cbb for more detail. It can be fixed by adding the line #include in libusbemu.cpp on line 32.
Since I am not familiar with GIT, i hope somebody can put this fix in the source.
Sincerely,
Gao Han/Rain_King
I don't know what's causing this, but when I view any depth or point cloud demos of the libfreenect library I get the following artifact/ghosting problem: http://imgur.com/a/NHFGH
I'm running ubuntu maverick and used the "manual" ubuntu installation instructions to satisfy the compilation dependencies as theyre listed in the wiki.
This same ghosting appears in the glpclview demo and in the open framework kinect demo.
I'm seeing problems with the depth view. It seems like packets are going into stream_process unordered. If magic detection fails, it's quite possible to find the correct magic header at hdr+960 instead.
[20:48:46][Zephod] nano -> can you see if the magic is ok with an offset of 960?
[20:51:20][nano-]: Zephod: yes.. every time it's of length 1908 it's ok with hdr+=960
..
[20:51:51][Zephod]: because your packages are exactly out of sync :)
[20:52:47][Zephod]: I see some porting is in order... my windows code deals with that case and drops the gaps
...
[21:21:32][Zephod]: and since the libkinect driver asks for 1920 bytes per interaction, you are getting "any 2 packets"
...
[21:23:07][Zephod]: but any 2 from that stream
[21:23:16][Zephod]: which consists of packets in 960 in length
[21:23:35][Zephod]: you can get stuff like [0 1] [2 3] or 0 [1 2] 3
[21:23:42][Zephod]: with [ ] being a packet reported from libusb
...
[21:38:40][nano-]: Zephod: But isn't it a bit odd that the depth stream has 1920 sized packets when it seems that 1760 sized are expected?
[21:40:30][Zephod] nano-: yes, but again... libusb oddity
[21:40:52][Zephod]: the packets for 1760 are actually packets of 960 and 800
The result is a lot of dropped packets leading to a choppy depth stream.
Using the libusb-1.0-0 1.0.8-2 from Ubuntu Stable, same version as in Debian Unstable.
Note that this only occurs after the 420f5c6 commit, if I revert to older, I get a smooth depth stream, at the cost of artifacts (so maybe those artifacts are produced by the same problem, but the stream is smooth as there are less dropped packets?)
Since people are starting to use the library in OpenFrameworks, we need extern C guards for name mangling.
Via danomatika on IRC
Currently, the only way to pass data into the image callbacks is through globals, which is a less than ideal strategy. Most callback implementations out there provide a void pointer for user data in their parameters for this purpose.
where is libfreenect.h ?
The current example lets the freenect stuff run in the main thread and puts the OpenGL things in an own thread. I think this is the wrong way, shouldn't OpenGL be running in the main thread? The complication with the current behaviour is, that the CPU will max out and the window cannot handle user interactions nor keyboard commands (try hitting ESC when running the example).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.