Astra Embedded S color sensor is not accessible through OpenNI2

Recently I’ve got an Astra Embedded S camera. I work on Windows - I’ve downloaded both Astra SDK 2.0.17 and OpenNI2 SDK 2.3.0.55 (as well as an Orbbec driver).

First, I started playing with OpenNI2 SDK. There is OrbbecStreamSample there. And it is strange that I cannot get color stream from the camera. It seems that oniDeviceGetSensorInfo(m_device, (OniSensorType)SENSOR_COLOR); gives me NULL - why is that?How can I access color sensor through OpenNI2 interface?

Also, I have some errors with IR and Depth streams. Unlike Color sensor, IR sensor is detected successfully. However, no frames come due to some errors in SDK and/or drivers. Here is the most verbose log for my camera session:

  5458388 INFO       New log started on 2019-09-20 16:37:21
  5458615 INFO       --- Filter Info --- Minimum Severity: VERBOSE
  5458906 VERBOSE    OpenNI 2.3.0 (Build 55)-Win32 (Dec 19 2018 16:13:52)
  5459011 VERBOSE    Configuration file found at 'E:\projects\OpenNI_2.3.0.55\UVCDemo\Windows\OrbbecStreamSample\Debug\OpenNI.ini'
  5459362 VERBOSE    Using 'E:\projects\OpenNI_2.3.0.55\UVCDemo\Windows\OrbbecStreamSample\Debug\OpenNI2\Drivers' as driver path
  5459498 VERBOSE    Looking for drivers at 'E:\projects\OpenNI_2.3.0.55\UVCDemo\Windows\OrbbecStreamSample\Debug\OpenNI2\Drivers'
  5459709 VERBOSE    Loading device driver 'OniFile.dll'...
  5460588 VERBOSE    Loading device driver 'orbbec.dll'...
  5462729 INFO       New log started on 2019-09-20 16:37:21
  5462802 INFO       --- Filter Info --- Minimum Severity: VERBOSE
  5556151 INFO       Device connected: Orbbec Astra (\\?\usb#vid_2bc5&pid_060b#7&29edb52a&0&2#{c3b5f022-5a42-1980-1909-ea72095601b1})
After initialization:

  6427855 VERBOSE    Trying to open device by URI '(NULL)'
  6432332 VERBOSE    Initializing device sensor...
  6434829 VERBOSE    Configuring module 'Device' from section 'Device' in file 'E:\projects\OpenNI_2.3.0.55\UVCDemo\Windows\OrbbecStreamSample\Debug\OpenNI2\Drivers\orbbec.ini'...
  6436666 INFO       Setting Device.UsbInterface to 0...
  6437206 INFO       Property Device.UsbInterface was changed to 0.
  6437800 INFO       Device.UsbInterface was successfully set.
  6443129 INFO       Module 'Device' configuration was loaded from file.
  6443590 VERBOSE    Connecting to USB device...
  6444156 VERBOSE    Trying to open sensor '\\?\usb#vid_2bc5&pid_060b#7&29edb52a&0&2#{c3b5f022-5a42-1980-1909-ea72095601b1}'...
  6446085 VERBOSE    USB Driver Version is: 4.3.0.9
  6446346 VERBOSE    USB Driver Current Alt Setting is: 0
  6446550 VERBOSE    Trying to open endpoint 0x4 for control out (for old firmwares)...
  6446989 INFO       Connected to USB device
  6453658 VERBOSE    Getting hardware versions...
  6467092 INFO       Hardware versions: FW=5.8.22 (14) HW=0 Chip=6 Sensor=0 SYS=12
  6480688 WARNING    Received NACK: 2
  6481114 INFO       Reading CMOS 0 supported presets...
  6484689 VERBOSE    Requesting KeepAlive...
  6486640 VERBOSE    Got KeepAlive Reply.
  6486985 VERBOSE    Setting mode to 3...
  6489413 VERBOSE    Requesting KeepAlive...
  6492365 VERBOSE    Got KeepAlive Reply.
  6494481 VERBOSE    Getting the fixed params...
  6496500 INFO       Reading sensor serial number...
  6498350 VERBOSE    Sensor serial number: AQ051930272
  6498516 VERBOSE    Getting algorithm params 0x7 for resolution 0 and fps 0....
  6500336 INFO       Reading sensor platform string...
  6502838 VERBOSE    Property Firmware.ReferenceResolution was changed to 2.
  6503025 VERBOSE    Reading all params from firmware...
  6506324 VERBOSE    Property Firmware.ImageLowLightCompensation (82) was changed to 1.
  6508331 VERBOSE    Property Firmware.DepthFormat (18) was changed to 3.
  6512329 VERBOSE    Property Firmware.DepthResolution (19) was changed to 1.
  6516323 VERBOSE    Property Firmware.DepthFPS (20) was changed to 30.
  6518327 VERBOSE    Property Firmware.DepthGain (21) was changed to 42.
  6522322 VERBOSE    Property Firmware.DepthHoleFilter (22) was changed to 1.
  6526576 VERBOSE    Property Firmware.DepthMirror (23) was changed to 1.
  6546339 VERBOSE    Property Firmware.DepthWhiteBalance (45) was changed to 1.
  6550330 VERBOSE    Property Firmware.IRFormat (25) was changed to 300.
  6554335 VERBOSE    Property Firmware.IRResolution (26) was changed to 1.
  6556335 VERBOSE    Property Firmware.Stream0Mode (5) was changed to 3.
  6558329 VERBOSE    Property Firmware.IRFPS (27) was changed to 30.
  6560354 VERBOSE    Property Firmware.Stream1Mode (6) was changed to 2.
  6585369 VERBOSE    Property Firmware.ImageFormat (12) was changed to 5.
  6589355 VERBOSE    Property Firmware.ImageResolution (13) was changed to 1.
  6591365 VERBOSE    Property Firmware.ImageFPS (14) was changed to 30.
  6593375 VERBOSE    Property Firmware.GMCMode (36) was changed to 1.
  6595359 VERBOSE    Property Firmware.ImageQuality (16) was changed to 3.
  6597363 VERBOSE    Property Firmware.ImageSharpness (76) was changed to 32.
  6601368 VERBOSE    Property Firmware.ImageAutoWhiteBalance (77) was changed to 1.
  6609368 VERBOSE    Property Firmware.ImageBacklightCompensation (79) was changed to 1.
  6613372 VERBOSE    Property Firmware.ImageAutoExposure (80) was changed to 1.
  6617354 VERBOSE    Firmware params were updated.
  6618128 INFO       Property Device.PhysicalDeviceName was changed to Mx6000 Deeyea.
  6618556 INFO       Property Device.VendorData was changed to Orbbec(R) Astra(TM) 3D Camera.
  6620100 INFO       Property Device.ID was changed to AQ051930272.
  6620656 INFO       Property Device.SensorPlatformString was changed to RD2409.
  6621397 INFO       Device sensor initialized
  9083546 INFO       Creating stream 'IR' of type 'IR'...
  9083715 INFO       Setting Device.ReadData to 1...
  9084589 VERBOSE    Opening endpoints...
  9085231 VERBOSE    Opening endpoint 0x81 for depth...
  9085738 VERBOSE    Depth endpoint is bulk.
  9085935 VERBOSE    Opening endpoint 0x82 for image...
  9086380 VERBOSE    Image endpoint is bulk.
  9086604 VERBOSE    Opening endpoint 0x83 for misc...
  9087381 VERBOSE    Misc endpoint is not supported...
  9087710 INFO       Endpoints open
  9088032 INFO       Property Device.UsbInterface was changed to 2.
  9088372 VERBOSE    Getting algorithm params 0x80 for resolution 0 and fps 0....
  9091048 INFO       Property Device.ReadData was changed to 1.
  9091157 INFO       Reading CMOS 0 supported presets...
  9094425 INFO       Device.ReadData was successfully set.
  9095073 VERBOSE    Initializing stream 'IR'...
  9095435 INFO       Property IR.Resolution was changed to QVGA.
  9095576 INFO       Property IR.XRes was changed to 320.
  9095917 INFO       Property IR.YRes was changed to 240.
  9096247 INFO       Property IR.FPS was changed to 30.
  9100066 INFO       Property IR.OutputFormat was changed to 203.
  9100467 INFO       Property IR.BytesPerPixel was changed to 2.
  9100825 INFO       Property IR.RequiredDataSize was changed to 158720.
  9101260 INFO       Property IR.SupportedModesCount was changed to 17.
  9101569 INFO       Property IR.Mirror was changed to 1.
  9104093 INFO       Stream 'IR' was initialized.
  9104419 INFO       'IR' stream was created.
  9104747 VERBOSE    Configuring module 'IR' from section 'IR' in file 'E:\projects\OpenNI_2.3.0.55\UVCDemo\Windows\OrbbecStreamSample\Debug\OpenNI2\Drivers\orbbec.ini'...
  9106374 INFO       Setting IR.Resolution to VGA...
  9106468 INFO       Property IR.Resolution was changed to VGA.
  9107630 INFO       Property IR.XRes was changed to 640.
  9107966 INFO       Property IR.RequiredDataSize was changed to 317440.
  9108297 INFO       Property IR.YRes was changed to 480.
  9108626 INFO       Property IR.RequiredDataSize was changed to 624640.
  9108995 INFO       IR.Resolution was successfully set.
  9112191 INFO       Module 'IR' configuration was loaded from file.
 11933210 INFO       Setting IR.OutputFormat to 200...
 11933375 INFO       Property IR.OutputFormat was changed to 200.
 11934612 INFO       Property IR.BytesPerPixel was changed to 3.
 11935053 INFO       Property IR.RequiredDataSize was changed to 936960.
 11935426 INFO       IR.OutputFormat was successfully set.
 11935799 INFO       Setting IR.FPS to 30...
 11936107 INFO       IR.FPS value did not change.
 11936398 INFO       Setting IR.XRes to 640...
 11936667 INFO       IR.XRes value did not change.
 11937682 INFO       Setting IR.YRes to 480...
 11938001 INFO       IR.YRes value did not change.
 12341210 VERBOSE    FW Stream IR was claimed by IR
 12341366 VERBOSE    Creating USB IR read thread...
 12342728 INFO       Property IR.ActualReadData was changed to 1.
 12342867 VERBOSE    Setting Firmware.IRResolution (26) to 1...
 12347840 VERBOSE    Firmware.IRResolution (26) was successfully set.
 12347975 VERBOSE    Setting Firmware.IRFPS (27) to 30...
 12349854 VERBOSE    Firmware.IRFPS (27) was successfully set.
 12349979 VERBOSE    Setting Firmware.IRMirror (72) to 0...
 12351831 VERBOSE    Firmware.IRMirror (72) was successfully set.
 12351912 VERBOSE    Getting algorithm params 0x6 for resolution 1 and fps 30....
 12354058 VERBOSE    Firmware stream 'IR' processor was replaced.
 12354128 VERBOSE    Getting algorithm params 0x80 for resolution 0 and fps 0....
 12355845 VERBOSE    Setting Firmware.Stream0Mode (5) to 3...
 12356456 WARNING    **IR: Expected 1, got 14**
 12356546 WARNING    **IR frame is corrupt!**
 12360044 VERBOSE    Firmware.Stream0Mode (5) was successfully set.
 12360177 VERBOSE    Setting Firmware.IRCropEnabled (60) to 0...
 12362046 VERBOSE    Firmware.IRCropEnabled (60) was successfully set.
 12362122 INFO       Property IR.State was changed to 1.
 15327046 VERBOSE    Endpoint 0x82 bandwidth: 67.85 KB/s
 15329567 VERBOSE    [FPS] IR: 0.00
 15329931 WARNING    IR: Expected 93, got 2857
 15330423 WARNING    IR frame is corrupt!
 15331183 WARNING    IR buffer is corrupt. Size is 154224 (!= 921600)
OB_INFO : obtained IAMVideoProcAmp
 18129258 INFO       Creating stream 'Depth' of type 'Depth'...
 18130120 VERBOSE    Initializing stream 'Depth'...
 18130501 VERBOSE    [FPS] IR: 1.07
 18131462 INFO       Property Depth.OutputFormat was changed to 100.
 18133384 INFO       Property Depth.BytesPerPixel was changed to 2.
 18134129 INFO       Property Depth.RequiredDataSize was changed to 614400.
 18135586 VERBOSE    Endpoint 0x82 bandwidth: 419.24 KB/s
 18136361 INFO       Property Depth.MaxDepth was changed to 65534.
 18137089 WARNING    IR: Expected 296d, got 2bcd
 18137810 WARNING    IR frame is corrupt!
 18138478 INFO       Property Depth.SupportedModesCount was changed to 47.
 18141372 WARNING    IR buffer is corrupt. Size is 154224 (!= 921600)
 18142014 WARNING    IR: Expected 2bcf, got 2bc7
 18142617 WARNING    IR frame is corrupt!
 18143235 INFO       Property Depth.Resolution was changed to QVGA.
 18143815 WARNING    IR buffer is corrupt. Size is 7344 (!= 921600)
 18144401 INFO       Property Depth.XRes was changed to 320.
 18145025 INFO       Property Depth.RequiredDataSize was changed to 307200.
 18146462 WARNING    IR: Expected 2c33, got 4ebb
 18147119 WARNING    IR frame is corrupt!
 18147715 INFO       Property Depth.YRes was changed to 240.
 18148373 WARNING    IR buffer is corrupt. Size is 741744 (!= 921600)
 18148970 INFO       Property Depth.RequiredDataSize was changed to 153600.
 18149598 INFO       Property Depth.FPS was changed to 30.
 18150211 INFO       Property Depth.ParamCoeff was changed to 4.
 18150820 INFO       Property Depth.ShiftScale was changed to 10.
 18151394 VERBOSE    Getting algorithm params 0x0 for resolution 1 and fps 30....
 18154120 INFO       Property Depth.ConstShift was changed to 200.
 18154654 INFO       Property Depth.ZPD was changed to 40.000000.
 18155444 INFO       Property Depth.ZPPS was changed to 0.041667.
 18156504 INFO       Property Depth.LDDIS was changed to 4.000000.
 18157269 INFO       Property Depth.DCRCDIS was changed to 1.000000.
 18157822 INFO       Property Depth.HorizontalFov was changed to 1.176013.
 18160346 INFO       Property Depth.VerticalFov was changed to 0.789588.
 18161423 VERBOSE    cmostype: 7 m_VerticalFOV: 0.789588, m_HorizontalFOV: 1.176013
 18161695 INFO       Property Depth.Gain was changed to 42.
 18162211 VERBOSE    Getting algorithm params 0x2 for resolution 4 and fps 30....
 18165046 VERBOSE    Getting algorithm params 0x2 for resolution 0 and fps 30....
 18167026 VERBOSE    Getting algorithm params 0x2 for resolution 1 and fps 30....
 18169033 VERBOSE    Getting algorithm params 0x3 for resolution 4 and fps 30....
 18171030 VERBOSE    Getting algorithm params 0x3 for resolution 0 and fps 30....
 18173040 VERBOSE    Getting algorithm params 0x3 for resolution 1 and fps 30....
 18216421 INFO       Property Depth.FirmwareMirror was changed to 1.
 18216658 INFO       Property Depth.Mirror was changed to 1.
 18217198 INFO       Stream 'Depth' was initialized.
 18217488 INFO       'Depth' stream was created.
 18217795 VERBOSE    Configuring module 'Depth' from section 'Depth' in file 'E:\projects\OpenNI_2.3.0.55\UVCDemo\Windows\OrbbecStreamSample\Debug\OpenNI2\Drivers\orbbec.ini'...
 18218370 INFO       Setting Depth.InputFormat to 3...
 18218435 INFO       Depth.InputFormat was successfully set.
 18223035 INFO       Setting Depth.Resolution to VGA...
 18223101 INFO       Property Depth.Resolution was changed to VGA.
 18223387 INFO       Property Depth.XRes was changed to 640.
 18223648 INFO       Property Depth.RequiredDataSize was changed to 307200.
 18223914 INFO       Property Depth.YRes was changed to 480.
 18224180 INFO       Property Depth.RequiredDataSize was changed to 614400.
 18224448 INFO       Depth.Resolution was successfully set.
 18225380 INFO       Module 'Depth' configuration was loaded from file.
951439980 VERBOSE    FW Stream Depth was claimed by Depth
951442374 VERBOSE    Endpoint 0x82 bandwidth: 1.37 KB/s
951445850 VERBOSE    [FPS] IR: 0.00 Depth: 0.00
951446023 VERBOSE    Creating USB depth read thread...
951446835 WARNING    IR: Expected 5063, got ebb9
951447456 WARNING    IR frame is corrupt!
951448106 INFO       Property Depth.ActualReadData was changed to 1.
951448786 WARNING    IR: Expected ebcd, got ebd7
951449932 VERBOSE    Setting Firmware.DepthFormat (18) to 3...
951453634 WARNING    IR buffer is corrupt. Size is 301104 (!= 921600)
951455122 VERBOSE    Firmware.DepthFormat (18) was successfully set.
951455276 VERBOSE    Setting Firmware.DepthResolution (19) to 1...
951459580 VERBOSE    Firmware.DepthResolution (19) was successfully set.
951459703 VERBOSE    Setting Firmware.DepthFPS (20) to 30...
951461570 VERBOSE    Firmware.DepthFPS (20) was successfully set.
951461643 VERBOSE    Setting Firmware.DepthHoleFilter (22) to 1...
951463573 VERBOSE    Firmware.DepthHoleFilter (22) was successfully set.
951463653 VERBOSE    Setting Firmware.DepthGain (21) to 42...
951465569 VERBOSE    Firmware.DepthGain (21) was successfully set.
951465637 VERBOSE    Setting Firmware.DepthDecimation (24) to 0...
951467569 VERBOSE    Firmware.DepthDecimation (24) was successfully set.
951467636 VERBOSE    Setting Firmware.Registration (2) to 0...
951469571 VERBOSE    Firmware.Registration (2) was successfully set.
951469645 VERBOSE    Setting Firmware.DepthMirror (23) to 1...
951471573 VERBOSE    Firmware.DepthMirror (23) was successfully set.
951471651 VERBOSE    Setting Firmware.GMCMode (36) to 1...
951473572 VERBOSE    Firmware.GMCMode (36) was successfully set.
951473663 VERBOSE    Setting Firmware.GMCDebug (61) to 0...
951475576 VERBOSE    Firmware.GMCDebug (61) was successfully set.
951475669 VERBOSE    Setting Firmware.WavelengthCorrection (73) to 0...
951477574 VERBOSE    Firmware.WavelengthCorrection (73) was successfully set.
951477657 VERBOSE    Setting Firmware.WavelengthCorrectionDebug (74) to 0...
951480758 VERBOSE    Firmware.WavelengthCorrectionDebug (74) was successfully set.
951480890 VERBOSE    Setting Firmware.DepthWhiteBalance (45) to 1...
951483759 VERBOSE    Firmware.DepthWhiteBalance (45) was successfully set.
951485906 VERBOSE    =================================================
951486015 VERBOSE    
    depth [479.040466,479.040466,326.566650,194.492340],
    color[455.263153,455.263153,316.732513,242.756363]
    r2lrotate[0.999994,-0.003379,0.000448, 0.003377,0.999986,0.004016, -0.000462,-0.004014,0.999992]
    r2lTrans[-14.531433,-0.032122,-0.307573], l_k[0.008472,-0.069294,0.000000,-0.000858,0.000058], 
    r_k[0.037933,-0.058403,0.000000,0.000329,0.000615]
951486496 VERBOSE    Firmware stream 'Depth' processor was replaced.
951486762 VERBOSE    Getting algorithm params 0x80 for resolution 0 and fps 0....
951489169 VERBOSE    Setting Firmware.Stream1Mode (6) to 2...
951490442 WARNING    IR buffer is corrupt. Size is 936960 (!= 921600)
951490523 WARNING    IR frame is corrupt!
951490790 WARNING    Depth: Expected 1, got 28
951492964 WARNING    Depth frame is corrupt!
951494203 VERBOSE    Firmware.Stream1Mode (6) was successfully set.
951494278 VERBOSE    Setting Firmware.CloseRange (84) to 0...
951496203 VERBOSE    Firmware.CloseRange (84) was successfully set.
951496281 VERBOSE    Setting Firmware.DepthCropEnabled (55) to 0...
951501212 VERBOSE    Firmware.DepthCropEnabled (55) was successfully set.
951501316 INFO       Property Depth.State was changed to 1.

As you can see, I received something like

15329931 WARNING    IR: Expected 93, got 2857
 15330423 WARNING    IR frame is corrupt!
 15331183 WARNING    IR buffer is corrupt. Size is 154224 (!= 921600)

However, I didn’t make any adjustments o setups, I installed everything just as described and start a demo.

So, how can I get Color stream and avoid errors with IR stream?

Thanks!

Hi yvoronov,

Embedded S is a UVC device and OpenNI doesn’t support it.
You could open OpenCV or other lib to open it.
For the IR image, please check the resolution 640x400 or 1280x800…

Wan

Thank you, wan.

As for the Depth stream, how can I get a set of actual resolutions available? There is a method SensorInfo::getSupportedVideoModes() in OpenNI2, that gives me a pretty long list that includes both 640x400 and 640x480. However, only 640x400 does really work.

What is the proper method in Astra SDK?

Thanks!

How do you register depth and RGB frames if depth is from OpneNi and RGB is from OpenCV?