Stereo calibration, the extrinsic parameters to tf?
Hello,
I have two identical RGB cameras fixed to a rigid structure. They are synchronized by it's own node. Each camera is rotated clock-wise and counter clock-wise (due to where the usb connector is mounted on the camera's pcb). Therefore, I have rotated the images first and then publish them and use them for calibration and stereo_proc.
I've done the stereo calibration and managed to have the stereo_proc node working with help I got from this answer (mine as well, I didn't know if I should have opened a new question or not....but as it's a different topic I did).
I have successfully calibrated the cameras and obtained these left.yaml and right.yaml
left.yaml
image_width: 512
image_height: 512
camera_name: stereo/left
camera_matrix:
rows: 3
cols: 3
data: [2344.331957, 0, 337.706086, 0, 2357.396758, 82.47229799999999, 0, 0, 1]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.6336689999999999, 3.019293, 0.013087, 0.008579, 0]
rectification_matrix:
rows: 3
cols: 3
data: [0.9948509999999999, -0.002312, 0.101323, 0.002147, 0.999996, 0.001734, -0.101327, -0.001507, 0.994852]
projection_matrix:
rows: 3
cols: 4
data: [4243.110203, 0, 70.32520700000001, 0, 0, 4243.110203, 75.543232, 0, 0, 0, 1, 0]
right.yaml
image_width: 512
image_height: 512
camera_name: stereo/right
camera_matrix:
rows: 3
cols: 3
data: [2346.048386, 0, 312.031898, 0, 2349.95312, 70.149203, 0, 0, 1]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.604228, 1.382571, 0.015306, 0.004007, 0]
rectification_matrix:
rows: 3
cols: 3
data: [0.993127, -0.003312, 0.116991, 0.003502, 0.9999929999999999, -0.00142, -0.116986, 0.00182, 0.9931319999999999]
projection_matrix:
rows: 3
cols: 4
data: [4243.110203, 0, 70.32520700000001, -4319.654554, 0, 4243.110203, 75.543232, 0, 0, 0, 1, 0]
So with {left, right}/{image_raw, camera_info} I can obtain the rectified images and disparity map (even though not so good at the moment, therefore the other question) but that would concern the intrinsic parameters.
What about the extrinsic parameters? How do I extract them from camera_info and publish them to tf?. The stereo_calibration tutorial does not mention any of this...is it because I have to do something else? Such as use the industrial_extrinsic_cal node?
Thank you for the help.
EDIT 1: The extrinsic parameters that I mean are the rotation and translation from one camera to another as I want to do "pixel" triangulation (e.g: Specify in x,y,z (from left camera, as stereo_proc does with the pointcloud) the position of a pixel (u,v) in left image). So, i neet the relative position between the two cameras within the stereo pair as I'll know the transformation between base_link and the left camera in my robot.
And please add whether you are interested in the extrinsic calibration with respect to some world frame, or between the two cameras.