Items with no label
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
3340 Discussions

Intrinsic camera parameters mismatch

SChop3
Novice
5,467 Views

Hello all,

I'm programming in C# , and capturing the depth, colour and pointcloud information from a realsense D435 camera. I'm projecting the depth data into 3D space using a standard function which requires the intrinsic camera parameters of the camera.

I was getting the intrinsics of the depth camera and noticed that the distortion coefficients were zero (as others have mentioned). Given the wide angle of the camera I thought this was unlikely but perhaps the factory calibration didn't include distortion...

To improve this I went about looking at https://www.intel.com/content/dam/support/us/en/documents/emerging-technologies/intel-realsense-technology/RealSense_D400%20_Custom_Calib_Paper.pdf custom calibrations so I could get a better lens model. When I was working through the instructions I used the command line tool which can read and write the parameters.

I wrote the intrinsic parameters using the command:

Intel.Realsense.CustomRW.exe -r > params.txt

I got the paramers:

I was suprised to see that the left and right infrared cameras have distortion coefficients! It then occured to me that perhaps I should be using the intrinsice from the infrared stream rather than the depth stream. I did that and got:

This is definitely the IR camera as there is no depth stream at full resolution (1280 x 800 matches the resolution given by the calibration software).

Thing to note:

  • Still no distortion coefficients!
  • focal length and principal points don't match!

A few questions:

  • Is this a software bug?
  • Are the parameters different because the image has been manipulated in the hardware?
  • Given all this, what parameters should I use to project the point cloud?
  • Does a different implementation of the SDK return distortion coefficients?

If anyone knows the answer to this, or has solved a similar problem I'd be really grateful. I'm not sure what to trust!

0 Kudos
1 Solution
idata
Employee
4,261 Views

Hello Wiredchop,

 

 

Thanks for posting in the RealSense community.

 

 

The SDK software reports the image coefficients which are 0, because the streams are rectified: https://github.com/IntelRealSense/librealsense/wiki/Projection-in-RealSense-SDK-2.0# d400-series. The calibration sw shows the calibration coeffs for the unrectified images.

 

 

Regarding your question why focal length and principal points do not match:

 

 

The calibration software is reporting the intrinsics for the 1280 x 800 resolution for the Y16 (unrectified) format. If you use the rs_sensor_control.exe example, you will see that you cannot retrieve the intrinsics for this resolution and format. The rs_sensor_control.exe example gives you intrinsics for rectified image, which will be slightly different.

 

 

You can use the utilities described in this webpage ( https://github.com/IntelRealSense/librealsense/wiki/Projection-in-RealSense-SDK-2.0) to do your projection and deprojection without having to use the unrectified parameters.

 

 

Best Regards,

 

Juan N.

View solution in original post

0 Kudos
2 Replies
idata
Employee
4,262 Views

Hello Wiredchop,

 

 

Thanks for posting in the RealSense community.

 

 

The SDK software reports the image coefficients which are 0, because the streams are rectified: https://github.com/IntelRealSense/librealsense/wiki/Projection-in-RealSense-SDK-2.0# d400-series. The calibration sw shows the calibration coeffs for the unrectified images.

 

 

Regarding your question why focal length and principal points do not match:

 

 

The calibration software is reporting the intrinsics for the 1280 x 800 resolution for the Y16 (unrectified) format. If you use the rs_sensor_control.exe example, you will see that you cannot retrieve the intrinsics for this resolution and format. The rs_sensor_control.exe example gives you intrinsics for rectified image, which will be slightly different.

 

 

You can use the utilities described in this webpage ( https://github.com/IntelRealSense/librealsense/wiki/Projection-in-RealSense-SDK-2.0) to do your projection and deprojection without having to use the unrectified parameters.

 

 

Best Regards,

 

Juan N.
0 Kudos
SChop3
Novice
4,261 Views

Thanks very much, that puts my mind at rest!

0 Kudos
Reply