Hello all, I'm trying to use ar_pose with a fisheye lens on a GigE Vision camera (specifically, a Vimba). Since the lens doesn't expose the whole sensor I am left with a choice, either use cameracalibration.py with very poor x coverage, or set the region of interest in the camera to only send back the square of pixels that actually contain information and calibrate on that. I tried it the first way first with mediocre results so I'm trying it the second way now but I'm hitting a problem; when I hit Store to store the calibration parameters in the camera it errors out because the resolution of the calibration doesn't match the resolution of the sensor.
What I want to do is use the camera with the reduced region of interest, but change the node that ar_pose gets the camera_info topic from (currently it's from the driver that gets the info from the camera, I want to replace it with something that reads it from disk). I don't think that's too hard to do, I'm just a ROS newb.
Edit: Here are the two calibrations;
Poor X coverage:
header:
seq: 911
stamp:
secs: 1461698059
nsecs: 40779009
frame_id: camera
height: 1458
width: 1936
distortion_model: plumb_bob
D: [-0.15703, 0.014130000000000002, 6.000000000000001e-05, 0.0025, 0.0]
K: [482.37535, 0.0, 985.71393, 0.0, 478.79862, 728.41403, 0.0, 0.0, 1.0]
R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
P: [1043.20752, 0.0, 935.81685, 0.0, 0.0, 1110.39636, 727.20482, 0.0, 0.0, 0.0, 1.0, 0.0]
binning_x: 1
binning_y: 1
roi:
x_offset: 300
y_offset: 50
height: 1358
width: 1358
do_rectify: True
---
Good coverage, cannot save into the camera:
# oST version 5.0 parameters
[image]
width
1358
height
1358
[narrow_stereo]
camera matrix
470.978444 0.000000 651.245530
0.000000 454.436211 686.264331
0.000000 0.000000 1.000000
distortion
-0.153380 0.013363 0.000422 -0.000092 0.000000
rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
projection
343.130035 0.000000 629.437552 0.000000
0.000000 325.993042 680.842927 0.000000
0.000000 0.000000 1.000000 0.000000
turtlebot@vision1:~/catkin_ws/src/massdest_bringup/calibrations$ cat ost.yaml
image_width: 1358
image_height: 1358
camera_name: narrow_stereo
camera_matrix:
rows: 3
cols: 3
data: [470.978444, 0.000000, 651.245530, 0.000000, 454.436211, 686.264331, 0.000000, 0.000000, 1.000000]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.153380, 0.013363, 0.000422, -0.000092, 0.000000]
rectification_matrix:
rows: 3
cols: 3
data: [1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000]
projection_matrix:
rows: 3
cols: 4
data: [343.130035, 0.000000, 629.437552, 0.000000, 0.000000, 325.993042, 680.842927, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000]
Originally posted by dunmatt on ROS Answers with karma: 1 on 2016-04-25
Post score: 0
Original comments
Comment by lucasw on 2016-04-26:
what was the x y offset to the roi you set in the camera?
Comment by lucasw on 2016-04-26:
Your poor x coverage camera matrix numbers look better- mainly because fx and fy are closer to each other (for most cameras and lenses fx=fy, but the sensor + lens + calibration error are going to make them a little different). The distortion number seem sufficiently similar between calibrations.