blueyeti / jit.realsense

RealSense external for Max/MSP
20 stars 8 forks source link

aligning color image to depth #3

Open davidbeaudry opened 6 years ago

davidbeaudry commented 6 years ago

Would it be possible to provide an output state of "color - aligned" as an option (or depth-aligned to color image?). I believe the realsense sdk provides the tool. Curious if it can be implemented in the max object? Thanks! David

jcelerier commented 6 years ago

hi! so, the realsense API used to provide these but they removed them at some point (when going from 1.0 to 2.0 : https://github.com/IntelRealSense/librealsense) - it's still marked as TODO here : https://github.com/IntelRealSense/librealsense/wiki/API-How-To and there are some issues about it : https://github.com/IntelRealSense/librealsense/issues/2279

Same for the point cloud by the way: they used to provide one but nowadays they just recommend to use OpenCV to extract it from the stereo camera: https://github.com/IntelRealSense/librealsense/blob/master/doc/depth-from-stereo.md

davidbeaudry commented 6 years ago

Hi! Thanks for your help with this. The 2.0 sdk does point to the align object in the examples (e.g. https://github.com/IntelRealSense/librealsense/tree/master/examples/align) Is that the portion that still on the todo list? In the meantime I'm going to try some simple cropping and re-aligning in jitter to see how close I can get. I realize the math is a bit more complex that this, but a quick test to see how challenging it will be to re-align the streams. It actually mentions in the first paragraph of the readme for the SDK that an align stream is available:

"The library also offers synthetic streams (pointcloud, depth aligned to color and vise-versa), and a built-in support for record and playback of streaming sessions."

Note that I'm using the D435 camera.

Thanks again for any help and/or pointers.

David