image_pipeline
image_pipeline copied to clipboard
fisheye calibration file of the image_pipleline calibration node doesn't use correct model for rectification.
Hi,
I used the integrated camera calibration tool with the fisheye model. The camera is been calibrated nicely and the calibration tool shows a good rectified image. However when the exported ost.yaml is loaded in the "camera_info_url" and processed with image_proc, the rectification is not working correctly. I assume the distrortion model is wrong, however I'm not sure how to solve it or if it is an actual bug. I'm using Melodic. Here my ost.yaml calibration file:
image_width: 1640 image_height: 1232 camera_name: csi_cam_0 camera_matrix: rows: 3 cols: 3 data: [ 403.97646, -0.96635, 871.2187 , 0. , 404.70652, 597.37327, 0. , 0. , 1. ] camera_model: fisheye distortion_coefficients: rows: 1 cols: 4 data: [0.175653, -0.031772, 0.000362, -0.000719] rectification_matrix: rows: 3 cols: 3 data: [ 1., 0., 0., 0., 1., 0., 0., 0., 1.] projection_matrix: rows: 3 cols: 4 data: [ 403.97646, -0.96635, 871.2187 , 0. , 0. , 404.70652, 597.37327, 0. , 0. , 0. , 1. , 0. ]
Any update on the issue? I'm in the same boat.
Here is my working config:
image_width: 1640 image_height: 1232 camera_name: csi_cam_0 camera_matrix: rows: 3 cols: 3 data: [ 403.97646, -0.96635, 871.2187 , 0. , 404.70652, 597.37327, 0. , 0. , 1. ] #camera_model: fisheye distortion_model: equidistant distortion_coefficients: rows: 1 cols: 4 data: [0.175653, -0.031772, 0.000362, -0.000719] rectification_matrix: rows: 3 cols: 3 data: [ 1., 0., 0., 0., 1., 0., 0., 0., 1.] projection_matrix: rows: 3 cols: 4 data: [ 403.97646, -0.96635, 871.2187 , 0. , 0. , 404.70652, 597.37327, 0. , 0. , 0. , 1. , 0. ]
You need to replace #camera_model: fisheye
with distortion_model: equidistant
.
This is definitely a bug/incompatibility!
@bjajoh Would you mind submitting a pull request to fix the issue?
@JWhitleyWork Yes, I'll do it soon :)
@bjajoh How did you run the node for fisheye calibration? I'm getting only zeros for the distortion coefficients :(
Hi @bjajoh , what do you mean with rectification is not working correctly
? I came to this issue, because the image rectification using image_proc does not work under Melodic for me at all. If one looks into image_geometry
, neither fisheye
nor equidistant
models are processed. Only neotic is able to handle the rectification of equidistant
. Under melodic it gives me:
$ ROS_NAMESPACE=camera rosrun image_proc image_proc
terminate called after throwing an instance of 'image_geometry::Exception'
what(): Cannot call rectifyImage when distortion is unknown.
Aborted (core dumped)
i also had similar issues in ros melodic
Similar issues on ros melodic too I will try it in a VM with ros noetic
I got it working using ros noetic. Eg. for a t265 with a camera_info topic: ROS_NAMESPACE=camera/fisheye1/ rosrun image_proc image_proc
It would appear that this was an issue with melodic due to an older image_geometry package - melodic is now EOL, and it looks like this is working in both Noetic and ROS2