1 | initial version |
You can enable OpenNI when building OpenCV from sources, by checking the WITH_OPENNI CMake option.
cv::VideoCapture capture(CV_CAP_OPENNI);
for(;;)
{
cv::Mat depthMap;
cv::Mat rgbImage
capture.grab();
capture.retrieve( depthMap, OPENNI_DEPTH_MAP );
capture.retrieve( bgrImage, OPENNI_BGR_IMAGE );
if( waitKey( 30 ) >= 0 )
break;
}
You can find more information here.
You can enable OpenNI when building OpenCV from sources, by checking the WITH_OPENNI CMake option.option. Then, in your code :
cv::VideoCapture capture(CV_CAP_OPENNI);
for(;;)
{
cv::Mat depthMap;
cv::Mat rgbImage
capture.grab();
capture.retrieve( depthMap, OPENNI_DEPTH_MAP );
capture.retrieve( bgrImage, OPENNI_BGR_IMAGE );
if( waitKey( 30 ) >= 0 )
break;
}
You can find more information here.
You can enable OpenNI when building OpenCV from sources, by checking the WITH_OPENNI CMake option. Then, in your code :
cv::VideoCapture capture(CV_CAP_OPENNI);
for(;;)
{
cv::Mat depthMap;
cv::Mat rgbImage
capture.grab();
capture.retrieve( depthMap, OPENNI_DEPTH_MAP );
capture.retrieve( bgrImage, OPENNI_BGR_IMAGE );
if( waitKey( cv::waitKey( 30 ) >= 0 )
break;
}
You can find more information here.