Image processing on Astra Mini RGB camera

Hello, friends, can someone help me out?

I received an Astra Mini recently and I was asked to use it on an image processing application. All I know until now is to open those tools on OpenNI, like NiViewer, ClosestPointViewer, MultiDepthViewer, etc.

Is it possible to take pictures with the RGB camera on the device and store the depth data at the moment the photo was taken?

I need detect circles on this picture, with Hough Transform, for example, and then figure the circle’s diameter using the depth measurements and simple trigonometry.

1 Like

Hello João,

I can only give you little information as I’m a newbie to Astra myself.
I haven’t tried OpenNI yet, but in the AstraSDK there is a sample app (SimpleStreamViewer-SFML) which displays a depth-stream and an RGB-stream side-by-side. So I believe it is definitely possible to get depth and RGB data at the same time.

– Tom


Thanks for answering.

Yeah, this side-by-side streaming is also included on the OpenNI viewer, but that’s not exactly what I want, because I can only watch the streaming, can’t work with it. I need to access some sort of raw data, something like a matrix of (x,y, r,g,b, depth), upon which I think I can apply some image processing code that I’m beginning to study.

In fact, there is an option of capture frames in the streaming tool, I tried it but I’m not sure where the frames are stored, I think it’s on the .oni file created in the folder. Anyone know how to open it?

You can do such things with OpenNI. There is some documentation on the Website of the structure sensor: OpenNI 2 Downloads and Documentation | The Structure Sensor. You may take a look at the OpenNI2 examples on GitHub too.

As far as I know OpenCV has buildin support for OpenNI too. But I never tried it…


Hi jvmr1,

You could use NiViewer in “OpenNI_2.3.55” to view and capture both the depth and color images.
For capturing frames, click “c” and there will be a new file called “CapturedFrames” popped out in the same folder with NiViewer. The images are stored in the folder.