ofTheo / ofxKinect

legacy openFrameworks wrapper for the xbox kinect (OF pre-0.8.0+ only) - ofxKinect is now included and is being maintained in OF releases
MIT License
540 stars 105 forks source link

far clipping default should be unlimited #53

Closed danomatika closed 13 years ago

danomatika commented 13 years ago

I just spent the last 6 hours or so mounting and testing an application only to find that the far clipping plane is set at 4m ... totally skewing my setup since I naturally assumed the default is unlimited and was trying to track down my "thresholding bug". I only discovered this thanks to comparing to an earlier app that was magically showing me things that are much farther away then the new app.

The near plane is at 0, how about the default far plane is something like 100m?

danomatika commented 13 years ago

Ah ok, I can set this by accessing the calibration. There should really be a note somewhere saying the default is 0 - 4m ... I suppose I got used to the older interpolation method. :P

Also, the alignment correct is off at 100m, so I suppose there should be an upper limit to check for.

kylemcdonald commented 13 years ago

4m is based on the fact that it incorporates about 90% of the kienct's resolution due to the logarithmic nature of the depth sensing (see http://openkinect.org/wiki/Imaging_Information#Depth_Camera). mapping this onto a linear scale means that anything bigger than 4m will start to cause linear loss in depth resolution. if you want more than 4m, i recommend setting the far clipping plane. or, better yet, use the raw distance information.

danomatika commented 13 years ago

Ok, that makes sense. I think I'm more annoyed since I didn't see anything about this in the header aka what you just wrote above including the link ...

kylemcdonald commented 13 years ago

if you plot 0.1236 * tan(rawDisparity / 2842.5 + 1.1863) you'll see why 4m is a reasonable choice. is that what you mean?