librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

Scaling D435 depth data to align with the color data

Open gjmsoftware opened this issue 8 years ago • 7 comments

Required Info
Camera Model D435
Firmware Version 05.08.15.00
Operating System & Version Win 10
Kernel Version (Linux Only)
Platform PC
SDK Version 2.10.2
Language C#/unity
Segment other

Issue Description

I currently have a 'Camera Calibration' scene on my Unity project, where I overlay a transparent depth map (using the depth stream) on top of the regular color stream. This allows for me to highlight a person/objects at a certain depth within the color stream, i.e. helping people calibrate the location of the camera. This worked relatively straight forward with the D415 since the images aligned properly. However, the D435's depth stream is scaled differently than the color stream.

Questions

  1. What is the easiest way to scale the depth data so that it matches with the color data?
  2. Does the .net/unity API have access to any functions that do this translation?

Thank you for the assistance and any information/direction would be much appreciated.

Greg

gjmsoftware avatar Aug 21 '18 02:08 gjmsoftware

Hi @gjmsoftware Please note that D435 has wider depth FOV, causing this problem. As far as I understand, what you need it the Align class. It would let you generate synthetic depth image from color viewpoint.

dorodnic avatar Aug 21 '18 11:08 dorodnic

Thanks Sergey, This seems like the right starting point. I'll give this a try this a try today and let you know how it goes.

gjmsoftware avatar Aug 21 '18 13:08 gjmsoftware

[Realsense Customer Engineering Team Comment] Hi gjmsoftware,

Do you still need help on this one?

Thanks!

hi, I'd like to ask the same but from the C++ side. What is needed to get the equivalent of the old SDK's color-aligned-to-depth ?

jcelerier avatar Sep 22 '18 06:09 jcelerier

[Realsense Customer Engineering Team Comment] Hi jcelerier,

Not sure if you have checked out this example. Would it help you? https://github.com/IntelRealSense/librealsense/tree/master/examples/align

Thanks, Richard

I apologize for the exceptionally late response @RealSense-Customer-Engineering - I do not need any further assistance with this. Thank you for the help.

gjmsoftware avatar Sep 29 '18 19:09 gjmsoftware

[Realsense Customer Engineering Team Comment] Hi gjmsoftware, Thanks for the update. Regards!