Astra Pro - Colorstream Performance

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

Take a look at the new Astra 2.0 SDK beta - it doesnt use openNI as such - and adds a whole boatload of other features - including color streams from the astra pro without using openCV - and integration of the body tracking sdk.

Westa

Hey,

that’s quite an improvement. I think I can work with that!

Thanks!
Julian

may be this will solve the problem.

cheers,
Prasanna