librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

On-Chip Self-Calibration

Open agrunnet opened this issue 6 years ago • 31 comments

We are starting this post to address any questions about the On-Chip Calibration. A white paper will be posted shortly. The features have already been released in the SDK as beta, and are accessible in the RealSense Viewer to test out already now. They are called:

1. "Self-Calibration" - This performs a health-check and tunes a RealSense Stereo Camera (D415 & D435) to improve the depth noise.
2. "Tare" - This function is for correcting the accuracy. You have to point at a flat wall where you know the ground-truth distance to the center point of the image. It will then adjust the calibration parameters accordingly.

Once a calibration has been performance, you can compare the new vs old calibration, and then proceed to burn the new value to memory so it persists after streaming stop or power off. There is also a function to recover "factory calibration", if desired.

The write paper describes all this in detail, and also explains how to invoke the functions programmatically.

Please note that these function are all done on-chip, as the name suggests. This means it should work for any OS and platform, and works over USB2 or USB3.

For clarification, On-Chip Calibration (or OCC in Intel-speak) is separate from what we called "factory calibration" or "technician calibration" or "dynamic calibration". All these techniques still exit.

We hope you enjoy it.

agrunnet avatar Feb 13 '20 01:02 agrunnet

Thanks so much for the information! I have shared a link to this post on the Intel Support site's RealSense forum.

MartyG-RealSense avatar Feb 13 '20 06:02 MartyG-RealSense

Great! After seeing a new android example app's code having two calibration method, I was just going to post a separate question till I saw this post. Will be looking forward to the detailed method.

Also, I am not sure if the android example has functionality to burn in the new calibration currently, so that it maintain state across boots.

kafan1986 avatar Feb 13 '20 11:02 kafan1986

Yes, we now have different example apps (including Android and Labview). They all allow for permanent updating of calibration.

agrunnet avatar Mar 12 '20 17:03 agrunnet

Here are the steps for doing the On-Chip Self-Calibration:

  1. Plug in the camera that requires calibration (FW should be 5.12.3+)
  2. Launch Intel RealSense Viewer version 2.33+
  3. Point to a scene that would normally give good depth.
  4. Click the ‘More’ button & choose “On-Chip Calibration”
  5. Click the Calibrate button in the pop-up layer
  6. Wait a couple of seconds while camera is being calibrated
  7. When done, a health-check number of >0.2 would indicate camera calibration was degraded.
  8. Compare the result by switching between ‘New’ and ‘Original’ options
  9. If you are happy with the result simply click ‘Apply New’ and you are all set!

agrunnet avatar Mar 12 '20 17:03 agrunnet

Here are the steps in pictures. Self-Calibration_step1 Self-Calibration_step2 Self-Calibration_step3 Self-Calibration_step4 Self-Calibration_Final

agrunnet avatar Mar 12 '20 17:03 agrunnet

@agrunnet Once I click "Apply Now", the new calibration values have been burned in right? and will stay across reboots? Also, any way to restore factory calibration?

kafan1986 avatar Mar 12 '20 21:03 kafan1986

Correct. Yes there is a command to restore. Actually I don’t think we have that yet in the viewer. Will need to fix that if not.

agrunnet avatar Mar 13 '20 01:03 agrunnet

when i use the function of On-chip Calibration, i want to know what's the difference between on-chip calibration and dynamic calibration. and how many images we need when app run on-chip calibration? what exactly does ground truth of tare calibration means, and is it the distance between the camera and a wall?

liuqh avatar Mar 13 '20 08:03 liuqh

We will be publishing a white paper next week. Sorry for delay.

agrunnet avatar Mar 13 '20 13:03 agrunnet

Is there a way to perform Tare calibration when the ground truth value is 500 mm using the Intel RealSense viewer?

ghost avatar Mar 20 '20 13:03 ghost

The Self-Calibration white paper document is now available!

https://dev.intelrealsense.com/docs/self-calibration-for-depth-cameras

MartyG-RealSense avatar Apr 02 '20 09:04 MartyG-RealSense

Hi

I have a question.

Regarding Tare calibration for D435i Where is the exact location of Depth=0 on the Camera ?

There are contradictions within the documents between the text and the drawings, and between the whitepaper of Self Calibration and the webinar.

Can someone here give an official answer?

alonAtAfimilk avatar Jun 01 '20 07:06 alonAtAfimilk

@alonAtAfimilk On the 400 Series cameras, the origin point is the center of the left IR imager. On the caseless Depth Module Kit boards, where measurements are approximate to the lens position, you should add a minus value to the depth measurements of -0.1 (mm) on D400 / D410 / D415 and -3.2 on D420 / D430 to find the ground truth.

image

The 'Back of module' values refer to the subtractions that should be made when the back of the Depth Kit module is the reference point instead of the lens.

On the cased USB cameras such as D415 and D435, measurements are from the front glass of the camera. So to find the ground truth on those models, you should add a minus value to the depth measurements of -1.1 on D415 and -4.2 on D435 / D435i.

image

MartyG-RealSense avatar Jun 01 '20 08:06 MartyG-RealSense

Hi Marty

thanks for the prompt answer As you can see in your own answer, the text is contradicting the table, and the text is contradicting itself. for example: in the third line of text you write D435, but in the table below it you write D430 in the text itself second line you write "caseless Depth Module", but in the third line you write D435, which is NOT caseless

regarding the last table, where your answer is to add -4.2 mm to the depth measurement: My measurements in lab, using D435i units and matlab, I got results of Z'=0 How did you validate your "-4.2" mm number ?

alonAtAfimilk avatar Jun 01 '20 10:06 alonAtAfimilk

My apologies, I was writing up the values for the cased cameras first and then added the section on Depth Kit modules, and so mis-wrote the model numbers. I've corrected the text to match the tables.

You only add the minus-value if you want the Ground Truth version of the measurements. Otherwise, for the D435i, assume that the glass on the front of the camera represents Z = 0 distance.

MartyG-RealSense avatar Jun 01 '20 11:06 MartyG-RealSense

thanx!

alonAtAfimilk avatar Jun 01 '20 12:06 alonAtAfimilk

May I know how long is the time should a Realsense D435 camera be calibrated regularly?

songshan0321 avatar Jun 23 '20 11:06 songshan0321

@songshan0321 I would say that the appropriate time for a calibration is when you think that the depth measurements are significantly incorrect or if the camera images have reduced in quality (for example, the depth image looking very broken).

For quick, regular calibrations, the RealSense Viewer has an on-chip self calibration system that can be used to perform a "health check" on the camera calibration. You can find the on-chip calibration in the menu of the 'More' option at the top of the Viewer's options side-panel.

image

Intel have published a white-paper guide about on-chip calibration at the link below:

https://dev.intelrealsense.com/docs/self-calibration-for-depth-cameras

MartyG-RealSense avatar Jun 23 '20 11:06 MartyG-RealSense

Thanks for your quick reply. I understand that I should calibrate when depth quality is significantly bad. However, in my case, I have multiple robots equipped with Realsense depth camera running on different places remotely, so that it is not feasible for me to check through one by one. Therefore, I am interested to know what is the suggested period for a regular calibration maintenance.

songshan0321 avatar Jun 23 '20 11:06 songshan0321

And I found that the health check value is not accurate. It shows "good" on one of my D435 but the depth quality is significantly bad. It turns out much better after a calibration is done.

songshan0321 avatar Jun 23 '20 11:06 songshan0321