Ask Your Question

Using camera calibration results in OpenCV

asked 2018-06-21 00:59:57 -0500

Mikhail K. gravatar image

I've calibrated Kinect intrinsics (both depth and rgb) using camera_calibration module and saved a bunch of rgb images afterwards (calibration file was detected successfully; subscription to kinect1/rgb/image_color was used). Do I need to load distortion coefficients and camera matrix parameters into my OpenCV application which will process the images or all the required image processing was done by applying the calibration file and I need to feed a vector with zeros as distortion coefficients and a 3x3 zero matrix with 1 at (2,2) as camera matrix? I'm specifically interested in using solvePnP or solvePnPRansac to estimate object pose in OpenCV code (I'm also not sure which one to use feel free to comment about them as well).

My launch file to publish images:

<arg name="camera1_id" default="A22596V03345310A" />
<arg name="camera2_id" default="A22596V03475310A" />
<arg name="camera1_name" default="kinect1" />
<arg name="camera2_name" default="kinect2" />
<arg name="depth_registration" default="true" />

<include file="$(find freenect_launch)/launch/freenect.launch">
    <arg name="device_id" value="$(arg camera1_id)" />
    <arg name="camera" value="$(arg camera1_name)" />
    <arg name="depth_registration" value="$(arg depth_registration)" />
<include file="$(find freenect_launch)/launch/freenect.launch">
    <arg name="device_id" value="$(arg camera2_id)" />
    <arg name="camera" value="$(arg camera2_name)" />
    <arg name="depth_registration" value="$(arg depth_registration)" />
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-22 22:02:08 -0500

kartikmohta gravatar image

If you are using the output of the driver directly, i.e. the image_color topic, then you need to use the distortion parameters and camera matrix obtained from the calibration.

If you use the rectified images, i.e. the image_rect_color, then the undistortion is already applied, so the distortion coefficients are zero but you need to use the projection matrix from the calibration in place of the camera matrix.

For an overview of the meaning of the matrices in the camera info, see .

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2018-06-21 00:56:38 -0500

Seen: 288 times

Last updated: Jun 22 '18