简体   繁体   中英

OpenNI2, BeagleBone Black, ASUS XTION camera: Problems getting color stream at 640x480

I am trying to save color and depth frames from the XTION onto the BeagleBone Black (BBB) for further analysis.

I compiled and installed OpenNI2 both for the BBB and for my development computer (MacAir with Kubuntu 14.04). SimpleRead runs correctly on both platforms.

I got my program to run correctly on the MacAir correctly at 30fps. Both the color and depth frames are successfully returned from openni::OpenNI::waitForAnyStream(...)

(I am polling waitForAnyStream inside a producer thread which waits indefinitely for a new frame. Then the frame is copied to a buffer and put into a boost spsc_queue to be analyzed and saved by a consumer thread.)

Then, I ported the program to the BBB using the g++ cross-compiler. When I run on the BBB at 640x480, openni::OpenNI::waitForAnyStream(...) never returns. If I decrease the resolution to 320x240 and change the pixel format for the color stream to openni::PIXEL_FORMAT_YUYV, it returns properly. I can live with the YUYV format but I need to get 640x480 working.

My question is if you have seen this problem before with the OpenNI2 framework? If so, how did you fix it?

Thank you for your time, Ben

PS. I couldn't get the Kinect to be recognized at all on the BBB. When I plug it into the MacAir, the green led lights up and it works correctly. On the BBB, it stays dark and I can't get OpenNI2 to find it. Any thoughts on this?

The problem with the Kinect could be that the kinect need more current than the ASUS, so maybe you have to use a HUB and then connect the HUB to the BBB.

And about the ASUS, (I don't know how fast can it process frames) but probably you are trying to make the BBB works faster than it can.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM