OpenCV OpenNI calibrate kinect

那年仲夏 提交于 2019-12-31 03:03:23

问题


I use home to capture by kinect:

capture.retrieve( depthMap, CV_CAP_OPENNI_DEPTH_MAP )
capture.retrieve( bgrImage, CV_CAP_OPENNI_BGR_IMAGE )

Now I don't know if I have to calibrate kinect to have depth pixel value correct. That is, if I take a pixel (u, v) from the image RBG, get the correct value of depth taking the pixels (u, v) from the image depth?

depthMap.at<uchar>(u,v)

Any help is much appreciated. Thanks!


回答1:


You can check if registration is on like so:

cout << "REGISTRATION     " << capture.get( CV_CAP_PROP_OPENNI_REGISTRATION ) << endl;

and if it's not, set it like so:

capture.set(CV_CAP_PROP_OPENNI_REGISTRATION,1);

or:

if(capture.get( CV_CAP_PROP_OPENNI_REGISTRATION ) == 0) capture.set(CV_CAP_PROP_OPENNI_REGISTRATION,1);


来源:https://stackoverflow.com/questions/11611585/opencv-openni-calibrate-kinect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!