OpenNI2 Color Stream Status

Hey there!

Can anyone clarify if the color stream is available in OpenNI2?

This post mentions that it’s accessible. Record from Astra with Python and OpenNI other posts seem to say it isn’t available.

I seem to be getting a None type returned form dev.create_color_stream()

Using OpenCV2, I can grab the camera using VideoCapture, but, the lag between this and the depth stream is pretty nasty.

Any pointers would be much appreciated :thumbsup:

Hi, I created the post you mention.
It depends on the sensor. For Astra and Astra S the color stream is availaible through OpenNI2 while it is not for Astra Pro. Check my repo here: https://github.com/roccopietrini/pyOniRecorder for the complete example. I use Astra S and Astra.

Thanks @rok for the reply, guess I need to order another camera :slight_smile:

Quite happy that I’ve managed to get the thing compiled up and depth sensing running quite happily on a Pi 3a+ with plain old Rasbian Stretch. I’ll be putting a howto up on GitHub soon.

1 Like

@rok thanks but I receive the following error at line “color_stream.set_mirroring_enabled(mirroring)”
AttributeError: ‘NoneType’ object has no attribute ‘set_mirroring_enabled’.

dev.has_sensor(openni2.SENSOR_COLOR) returns “False” for my Orbbec Astra Stereo S USB 3.0 camera.
I successfully process depth and infrared stream with the the same camera.

Does it mean that my Astra Stereo S is not supporting COLOR STREAM?

I can’t be sure because I don’t have that specific camera, but probably your camera is not supported by openni2 for color stream (the same happen with the Astra Pro, it has the color stream, but it is not accessible by OpenNI2, you need the Astra SDK)…You can try with the Astra SDK or you can contact Orbbec support…

Hi Asifkhan,

Color stream of Astra Stereo S USB3.0 is available and accessible.
Astra Stereo S USB3.0 is also an UVC camera, the same as Astra Pro.
OpenNI doesn’t support UVC camera, so you could use 3rd party library to get the color stream.
You could use OpenCV or AStra SDK.

Wan

1 Like

@wan Why can’t I initialize Astra Stereo S? Please follow details of my question at Why can't initialize Astra Stereo S

Hi @wan, If get color stream using Opencv and depth stream using OpenNi then how can I register both these streams?