image_pipeline icon indicating copy to clipboard operation
image_pipeline copied to clipboard

Problem with camera info message after process of camera calibration #82

Open gustavojoseleite opened this issue 2 years ago • 0 comments

I'm using a mako G319 camera whose maximum resolution is 1536x2064. I applied binning to reduce the resolution by four times, that is, to 384x516. When performing the calibration of the set (camera and lenses) the calibration parameters were loaded and the camera info of the camera driver is published as follows: height: 1544 width: 2064 distortion_model: "plumb_bob" D: [-0.097715, 0.08086, -0.003701, 0.001999, 0.0] K: [299.54396, 0.0, 254.14465, 0.0, 300.14093, 183.94307, 0.0, 0.0, 1.0] A: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] P: [298.52789, 0.0, 255.89954, 0.0, 0.0, 300.0076, 182.47257, 0.0, 0.0, 0.0, 1.0, 0.0] binning_x: 4 binning_y: 4

As a result, the rectified image is distorted and approximately one-quarter of the actual size. I created a new publish for the camera info with the resolution considering the binning applied as follows: height: 384 width: 516 distortion_model: "plumb_bob" D: [-0.097715, 0.08086, -0.003701, 0.001999, 0.0] K: [299.54396, 0.0, 254.14465, 0.0, 300.14093, 183.94307, 0.0, 0.0, 1.0] A: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] P: [298.52789, 0.0, 255.89954, 0.0, 0.0, 300.0076, 182.47257, 0.0, 0.0, 0.0, 1.0, 0.0] binning_x: 0 binning_y: 0

After this last change, the image was correctly rectified and was as expected. Is there a way to publish the correct camera info without having to republish it by changing resolution and binning? Could there be an error during the calibration process that led to this issue?

gustavojoseleite avatar Mar 09 '22 17:03 gustavojoseleite