即时尝试访问深度图的像素值,使用kinect,openni和opencv。 IM使用此代码访问像素值深度图
Mat depth;
VideoCapture capture1(CV_CAP_OPENNI);
capture1.grab();
capture1.retrieve(depth,CV_CAP_OPENNI_DEPTH_MAP);
imshow("depth",depth);
waitKey(0);
cout << depth.at<unsigned>(20,20);
system("PAUSE");
程序告诉我深度图,但是当我试图acccess的值,产生错误。但如果放:
cout << depth;
然后显示我的所有值。
哪个版本的OpenCV是这样吗? – Jacob