ofxKinect calibration

Does anyone know if the ofxKinect plugin automatically calibrates the kinect or if it needs to be done manually. If it is automatic is there any way to manually configure it? Any help would be much appreciated.

some time ago I made this: http://geekjutsu.wordpress.com/2010/11/30/kinect-calibration/

it’s based on Arturo’s calibration code and does not want to be a rock solid calibrator, but it should point you in the right direction

also kyle has recently done this:


which should be easy to plug into ofxKinect even if it’s manually

Ehy, i try Kyle software but doesn’t work on my Mac. I don’t see nothing and all go very slow… Does anyone have tested on Lion?

And onother question… i’m not sure, so i ask. If i use this software and after openCV method, after my depth image and my RGB image will coincide? So, i can resolve my problem that i wrote in this post: http://forum.openframeworks.cc/t/ofxkinect-depth-and-some-other-problems…/6755/6 (second image)?

Ehmmm… i try again… i disabled my iSight but now the software doesn’t see nothing. It seems not to find my kinect. Do you have any idea?

hey mauro, the camera calibration stuff that i posted is only for ofxVideoGrabber devices. you could change the app to work with ofxKinect, but if you’re not already familiar with ofxKinect that might be a little difficult. furthermore, once you have the cameras calibrated, you would still need to get their relative relationship worked out. it’s not easy.

right now i would encourage you to work instead with ofxOpenNi. ofxOpenNi will give you an rgb image that is already calibrated to the depth image. you don’t have to do any extra work. eventually this should be included in ofxKinect too, but it’s still in development.

hope that helps!

Thanks a lot Kyle!
I tried to use ofxOpenNi and finally i solve my problem.
Really i haven’t found rgb image calibrated to the depth image. When i draw rgb image and depth image, i see the same problem… maybe i have to search better.
Anyway i solved getting pixels from

recordDepth.getDepthPixels(nearThreshold, farThreshold);  

Now i can mask fairly well some area that are not too close from my kinect.
There is only a stranger flicker near border, but i hope to resolve it.
Yuppiii!!! :slight_smile:

1 Like

Hi Mauro,
you have to call mContext.toggleRegisterViewport(); supposing that your context is declared as mContext.
you might want to call it in the setup.
This will solve your problem.

good luck

Yes. I already use toggleRegisterViewport() and it works.
In fact, if i don’t use, i have the same problem i seen using ofxKinect in my past projects.
So, now is late, tomorrow i will study openNi.

Sure, what that method does is to switch between the calibrated RGB and the Raw RGB.

Sorry for this question, I am new into kinect and computer vision.
I know what the purpose of calibration is, however I am confused.
According to geekjutsu last comment of his post, it is no longer necessary with new version of ofxKinect. Am I right?.



Hey Kovicic,
That’s correct, the newest version of ofxKinect includes the calibration already done.
Calibration has two purposes, to determine a camera’s intrisic values; this is lens aberrations, field of view, etc.
When using two cameras that already have their intrisic values, you can determine the spatial relationship between them.
The idea of having the calibration values is that you can transfrom one camera view into another camera view.
as all kinects are identical (almost), these values are the same for all kinects.
So, having the calibration values you can transform the depth pixels of the kinect into the correct position relative to the RGB pixels.

Thanks Roy, a very good explanation that summed it up what I understood but I wasn’t totally sure.
Saludos desde Montevideo :smile: