IntelRealSense / realsense-ros

ROS Wrapper for Intel(R) RealSense(TM) Cameras
http://wiki.ros.org/RealSense
Apache License 2.0
2.6k stars 1.76k forks source link

d405 camera measurement data may vary due to different camera resolutions #3259

Closed Nanmei closed 7 hours ago

Nanmei commented 1 day ago

| Camera Model | { D405 } | | Firmware Version | (Open RealSense Viewer --> Click info) | | Operating System & Version | { Ubuntu 18 } | | Kernel Version (Linux Only) | (e.g. 5.4) | | Platform | PC | | Librealsense SDK Version | { v2.55.1 } | | Language | {C/C#/labview/opencv/pcl/python/unity } | | Segment | {Robot/Smartphone/VR/AR/others } | | ROS Distro | {melodic} | | RealSense ROS Wrapper Version | {4.51.1, 4.54.1, etc..} |

I am using a D405 camera, and when measuring the position of the measurement point, I found that the measurement data may vary due to different camera resolutions, resulting in different measurement results. I measured the distance of the mouse pointing position using a resolution of 848 480 as shown in the following figure. The measurement distance of 848 480 is -0.207 meters. When I changed the resolution to 640 480, the measured distance was -0.184 meters. The actual result I measured using a ruler is -0.2 meters. The measurement data is correct at a resolution of 848 480. However, the 640 480 measurement data shows significant errors. I can only use 640 480 during actual use, so I don't know how to solve it?

848_480_p1 640_480_p1

MartyG-RealSense commented 1 day ago

Hi @Nanmei As resolution is reduced, accuracy reduces. 848x480 is the resolution for optimal depth accuracy So what you are experiencing when reducing to 640x480 would be an expected behaviour.

I would recommend going to Stereo Module > Post-Processing and expanding open the list of post-processing filters, then left-click on the blue icon beside the Decimation Filter to turn the icon red (meaning it is off). The decimation filter 'downsamples' the selected resolution by half, so you should get the full 640x480 resolution when the filter is disabled instead of the image being downsampled to 320x240.

Does the depth value at 640x480 become closer to the value at 848x480 if you disable the decimation filter?

Nanmei commented 7 hours ago

Hi @Nanmei As resolution is reduced, accuracy reduces. 848x480 is the resolution for optimal depth accuracy So what you are experiencing when reducing to 640x480 would be an expected behaviour.

I would recommend going to Stereo Module > Post-Processing and expanding open the list of post-processing filters, then left-click on the blue icon beside the Decimation Filter to turn the icon red (meaning it is off). The decimation filter 'downsamples' the selected resolution by half, so you should get the full 640x480 resolution when the filter is disabled instead of the image being downsampled to 320x240.

Does the depth value at 640x480 become closer to the value at 848x480 if you disable the decimation filter?

When I turn off Decimation Filter , The depth value has not changed, I have changed the resolution of my project to 848*480. Thank you very much for your reply.

MartyG-RealSense commented 3 hours ago

You are very welcome, @Nanmei - I'm pleased to hear that you were successful. Thanks very much for the update!