Hi.
Using the Astra Pro for a 3d tracking app I am retrieving the depthstream using OpenNI and the colorstream using OpenCV 2.6.4.
Depending on the resolution, the colorstream costs me quite many fps. At a resolution of 1280x720, I am paying ~15fps resulting in a final framerate of 10-12 fps. I’ve tested this with only retrieving colorstream, not even modifying or displaying it. It seems like the depthstream has a better performance. It is worth noting that I am not getting this performance hit when using a webcam instead the Astra Pro for the colorstream (while still using its depthstream).
The code for getting the colorstream is basically the same as in the astra pro viewer example, which also has a quite bad performance for me:
// Some init function
// m_videoCapture is cv::VideoCapture
if (!m_videoCapture.open(1))
{
return;
}
//g_colorWidth = 1280
//g_colorHeight = 720
m_videoCapture.set(CV_CAP_PROP_FRAME_WIDTH, g_colorWidth);
m_videoCapture.set(CV_CAP_PROP_FRAME_HEIGHT, g_colorHeight);
// Frame update function
// m_cachedColorImage is cv::Mat
m_videoCapture >> m_cachedColorImage; // This line ruins my day
Are there any ways I can optimize this? If not: Are there alternative, more performant solutions for getting the color stream? I want to warn that OpenNI is no option for the colorstream for the Astra Pro sensor.
Thanks a lot!
Julian