Items with no label
3335 Discussions

D435 systematically over-estimates Z-Depth

MCalv4
Beginner
3,694 Views

I am trying to calibrate my D435 by measuring the range to targets (Y=100mm, 200mm, 300mm and 390mm) at a known distances:

The camera is 390mm from the ground plane, horizontal (the top target is pixel row 240 at all distances), my spirit level tells me that my floor is flat and the targets are perpendicular.

I take the Z distance (the raw range from the camera depthmap, no post-processing) to each of the 4 targets, averaged over 100 measurements, for Z=500mm, 1m, 1.5m, 2m, 2.5m and 3m.

This is the Z-Y plot of the results (2'200 measurements):

The Y error is due due to the published +-3% tolerance in the vertical FOV (which I estimate by linear regression to be 56.1739°).

The true Z distance roughly follows the quadratic a*Z*Z+b*Z+c for a=-0.000039 b=0.0375 and c=-6.531 (which interestingly is the 7mm mentioned in this thread /thread/128141 https://communities.intel.com/thread/128141 and I have no problem applying that to get a more accurate result.

Now my setup may be a little off-kilter, but the Z error is consistently some +300mm (+10%) at 3 metres.

That the error increases as a square of the distance, I fully understand, but assuming that the error is gaussian it should average out over 100 measurements and not systematically increase as a function of Z.

Have I made another glaring blunder?

-0.000039497035
0 Kudos
13 Replies
MartyG
Honored Contributor III
1,196 Views

What resolution are you using please? Depth error can increase as resolution reduces, so it is recommended that a resolution of at least 848x480 is used on D435 and 1280x720 on D415 (see the image below from Intel-s tuning guide - left-click on it to view in full size).

0 Kudos
MCalv4
Beginner
1,196 Views

Hi Marty, thanks for the prompt follow-up.

I'm following the recommendations in Intel-RealSense-Depth-PostProcess.pdf and BKMs-For-Tuning-RealSense_D4xx_Cameras_WP_1.7.pdf.

  • Default visual preset
  • Intel.Realsense.CustomRW.exe -g to reset to golden standard factory
  • 848x480
  • No post-processing. I've tried turning all the post-processors on (except decimation), nothing changes.

As my application needs to recognise thin obstacles (flower stalks), I'd prefer to avoid decimation if at all possible.

I know from the BKM that the error at 3m is around 35mm but the Z is systematically over-estimated, when I would have expected the readings to wander around 3m (above and below).

This isn't a problem per se; if all cameras behave like this it's easily corrected. My worry is that my setup is incorrect in some way.

0 Kudos
MartyG
Honored Contributor III
1,195 Views

Are you sure you have 100 measurements? If you had less or more than 100 measurements and were adding up all the measurements and then dividing the total by a fixed value of 100 to get the average of the distance, that would skew the result.

0 Kudos
MCalv4
Beginner
1,194 Views

I've repeated the experiment, logging every measurement, with its timestamp, see attached .XLS.

The true distances 500, 1'000, 1'500 etc are measured from the camera's glass, with a steel ruler.

Here's a screenshot of my test harness whilst measuring at 1'500mm:

FYI, at the bottom, you can see the values for column 424 at 1'000mm; the floor is flat out to 1 metre and then the Y increases almost vertically as expected, indicating the wooden target.

The red cross indicates where the obstacle is, I.E. the first pixel where the next pixel is >30mm higher.

The measurements are the raw range values at row 240 column 424, the centre of the camera (the true camera centre is actually 239.5, 423.5 but half a pixel is insignificant).

The unexpectedly large error seems to increase exponentially:

Interestingly, the intercept of the red trend line is very close to zero, which implies that the Z focal point isn't far from the glass.

So, merging this question with my related focal-point question, /thread/128141http:// https://communities.intel.com/thread/128141

  1. From this data, where is the Z focal point?
  2. Why does the error increase with range?
0 Kudos
MartyG
Honored Contributor III
1,195 Views

The greater the distance that is being measured, the greater the RMS Error factor (or depth noise) of the camera becomes. The RMS Error on the D435 model over distance is larger than the D415 model due to the characteristics of the D435's hardware.

The D435 is the upper line in orange, and the D415 is the lower green line. There are similarities between Intel's RMS Error chart and your own D435 chart's curvature when they are placed beside each other.

The two charts do not measure error the same - the Intel chart measures error amount in mm and you measure it in percent - but the principle is similar.

0 Kudos
MCalv4
Beginner
1,195 Views

It seems like I haven't been clear enough between https://en.wikipedia.org/wiki/Accuracy_and_precision accuracy and precision.

My camera is remarkably precise (RMS deviation from the mean), it's nearly as good as a D415, according to your graph:

It's the accuracy which is the problem, the error is over 425mm at 3 metres:

When measuring a target 3 metres away it reports an average range of 3425.39 over 100 readings with an RMS error of ~17mm.

Statistically, one would expect the measurements to be a gaussian distribution around 3000mm and not around 3425.29mm.

Those numbers equate to an RMS precision of ±17mm (which is stunning) but an inaccuracy of 425.39mm (which is ghastly).

Does that make my issue clearer?

0 Kudos
MartyG
Honored Contributor III
1,195 Views

The definitive guide to testing depth results with the 400 Series cameras is Intel's "Depth Testing Methodology" paper. Following the testing procedures in this paper is the best way to test whether there is a problem with the results that you are getting.

https://www.intel.com/content/dam/support/us/en/documents/emerging-technologies/intel-realsense-technology/RealSense_DepthQualityTesting.pdf https://www.intel.com/content/dam/support/us/en/documents/emerging-technologies/intel-realsense-technology/RealSense_Dep

0 Kudos
MCalv4
Beginner
1,195 Views

I had read that paper, thanks, and used its methods to determine the accuracy, described in my posts above.

My Z-Accuracy (section 1.3.1, page 7) is incorrect by 425mm at 3 metres, whilst your error graph says the Z-Accuracy error should be around 35mm.

The issue remains: Why is my camera's Z-Accuracy an order of magnitude worse than expected?

0 Kudos
MartyG
Honored Contributor III
1,195 Views

I see that you calibrated your camera that last time that we discussed unusual measurements in an earlier case. So it is probably not worth suggesting calibration again, unless the camera has taken a hard knock or a drop onto the floor since that case, which could throw off the calibration.

0 Kudos
idata
Employee
1,195 Views

Hi Maurice,

 

Has re calibrating your camera resulted in better Z-Depth accuracy?

 

 

Regards,

 

Sahira
0 Kudos
MCalv4
Beginner
1,195 Views

I reset to the gold factory with

Intel.Realsense.CustomRW.exe -g

Can I assume that this should bring me back to a good starting point?

0 Kudos
MartyG
Honored Contributor III
1,195 Views

Now that you have done the reset, please try the firmware updater tool again to see if you can successfully complete the firmware update this time.

0 Kudos
KInou4
Beginner
1,195 Views

Hello, is there any update? I have the same problem, and the recalibration does not work for me. The only way I could do was change "Depth unit" to correct the value.

0 Kudos
Reply