IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.58k stars 4.82k forks source link

D400 series stereo matching #7608

Closed sho-ji closed 3 years ago

sho-ji commented 4 years ago
Required Info
Camera Model D400

Issue Description

When I shoot an object, the corners are rounded. I think this phenomenon depends on the number of pixels in stereo matching. How many pixels does the D400 series stereo matching use?

MartyG-RealSense commented 4 years ago

Hi @sho-ji The 400 Series stereo cameras do not have a confidence threshold like the SR30x models do, so pixels are either 100% matched or they are not matched.

https://github.com/IntelRealSense/librealsense/issues/3185#issuecomment-460540961

Aside from using the Second Peak Threshold setting to simulate a confidence map as the above link suggests, you may also get less "blobbiness" in the image if you increase the value of the Laser Power setting in combination with the Medium Density. visual preset (for a balance between accuracy and fill-rate)

https://github.com/IntelRealSense/librealsense/issues/7021#issuecomment-670444359

If you are applying a smoothing filter than that may also contribute towards the occurrence of rounded corners, as described in 2. Edge-preserving filtering of the section of Intel's post-processing guide linked to below.

https://dev.intelrealsense.com/docs/depth-post-processing#section-simple-post-processing

sho-ji commented 4 years ago

Hi @MartyG-RealSense Thank you for your answer. Stereo matching is not processed using only 1 pixel, isn't it? If you don't use a few pixels, you won't be able to find a reliable depth. And since it is rare that all the pixel values match, I think that the 1st peak will be acquired. Therefore, I think there is a threshold for judging that they do not match.

Is there any material that describes that part in detail?

MartyG-RealSense commented 3 years ago

The Depth from Stereo documentation provides more information about matching.

https://github.com/IntelRealSense/librealsense/blob/master/doc/depth-from-stereo.md

sho-ji commented 3 years ago

Thank you very much!