I managed to compile and install opencv with OpenNI2 in Lubunutu (Arm architecture). I tested the example provided in /samples/cpp/openni_capture.cpp and it succeeds in communicating with the sensor and displaying the information about it. However, the program reaches a points just before showing the images/data and nothing happens, the program hangs in the line if(!capture.grab() .
for(;;)
{
...
if( !capture.grab() )
{
cout << "Can not grab images." << endl;
return -1;
}
else
{
if( retrievedImageFlags[0] && capture.retrieve( depthMap, CAP_OPENNI_DEPTH_MAP ) )
{
const float scaleFactor = 0.05f;
Mat show; depthMap.convertTo( show, CV_8UC1, scaleFactor );
imshow( "depth map", show );
}
...
}
I wrote some lines to make sure that the problem is in that function and it is, I'm quite sure. It doesn't even show the error message. Does anybody know what's going on or how to solve this? Thanks