What disparity shift value to use for range from 1m to 1.5m
| Required Info | |
|---|---|
| Camera Model | D415 |
| Firmware Version | 05.11.04.00 |
| Operating System & Version | Win 10 |
| Kernel Version (Linux Only) | |
| Platform | NVIDIA GTX 1070 |
| SDK Version | |
| Language | python |
| Segment | Robot |
Issue Description
We have a usecase wherein our camera is mounted at 4ft high from a conveyor belt. We are trying to focus on objects within the range of 100cm to 150cm. I am hoping to get better depth accuracy by increasing the disparity shift number. But reading through https://www.intel.com/content/dam/support/us/en/documents/emerging-technologies/intel-realsense-technology/BKMs_Tuning_RealSense_D4xx_Cam.pdf I couldn't really understand what is the correct value to use. If we use disparity shift of 50, according to the document we will get minZ=30cm and maxZ=110cm... I am not sure if I should set minZ to 70 or something else to get into the 100cm to 150 cm range.
I guess the question is also how to measure:
- 𝒇𝒐𝒄𝒂𝒍 𝒍𝒆𝒏𝒈𝒕𝒉(𝒑𝒊𝒙𝒆𝒍𝒔)
- 𝑩𝒂𝒔𝒆𝒍𝒊𝒏𝒆(𝒎𝒎)
Found Baseline & Focal Length for D415 in the product specs.
Now the question is how to get Focal Length in Pixels from mm.
You can read the focal length in pixels through the SDK (intrinsics).
But you won’t be able to improve depth accuracy by changing the disparity shift. (At least not unless you use it to move closer than the minZ)
Thanks for the information @agrunnet. I am wondering what help does disparity shift provide if not for helping in getter depth values?
The disparity shift is mainly for reducing the minimum distance. Which allows you to get nearer to objects. (Which does then improve the noise as the square of the distance away). There is a white paper on the intel RealSense website that describes the best known methods for tuning performance which includes a discussion about this so should be helpful.
Thanks @agrunnet, as described in that paper, why does setting a disparity shift of 50 set the MaxZ to 110cm? Shouldn't MaxZ be infinite?
As the whitepaper mentioned "Because of the inverse relationship between disparity and depth, MaxZ will decrease much faster than minZ as the disparity shift is increased." The disparity shift method decreases the minZ, but it sacrifices the maxZ.
Using the MinZ and MaxZ values shown in Disparity Figure on this page, approximate formulae for depths should be: MinZ = focal length(pixels) x baseline(mm) / (126+disparityShift) MaxZ = focal length(pixels) x baseline(mm) / (disparityShift)