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

add routines to access intrinsic camera parameters #105

Closed coolvision closed 11 years ago

coolvision commented 12 years ago

added routines to access freenect's registration.zero_plane_info float getRefPixelSize(); float getRefDistance(); I'm using it in my projects for conversion of depth pixels into 3d points on GPU: https://github.com/coolvision/KinectShape https://github.com/coolvision/ofxRangeToWorldCUDA

kylemcdonald commented 12 years ago

this looks good to me, anyone disagree?

very cool that you're implementing kinect fusion with ofxKinect! does it work yet? it looks like it needs to be linux+nvidia, right?

ofTheo commented 12 years ago

Well the methods added are returning two out of the four members of freenect_zero_plane_info. The other two might be useful to have access to as well.

Maybe better to have a single method that returns the freenect_zero_plane_info struct, that way if it gets updated we don't have to keep trying to match what it contains?

@coolvision what do you think? maybe thats more useful?

coolvision commented 12 years ago

@kylemcdonald my kinect fusion implementation kind of works, it hardly can robustly reconstruct objects from all sides, but at least it demonstrates fusion of multiple depth maps for gaps filling and smoothing. Yes, it was tested only on linux+nvidia.

@ofTheo in case of returning freenect_zero_plane_info we should include libfreenect-registration.h outiside of ofxKinect? I think I could just add 2 more getters for other 2 parameters?

danomatika commented 11 years ago

@ofTheo I don't think it's doing a copy here, just retrieving data from the struct which will most probably not change once the device is connected to. I don't see the need for copying the struct or returning it in a single call.

I'll accept this, move the registration header include to ofxKinect.cpp, and add the other two getters.

danomatika commented 11 years ago

Ok, all 4 getters are there with relevant comments. Will this suffice? https://github.com/ofTheo/ofxKinect/commit/c2a0fcc4aba0a6cc67364db155e97256acd70184