roi in a rectified stereo-camera for visual odometry
Hello,
I am using two point grey gige cameras as a stereo-system for viso2_ros. Now i am wondering if anyone has made experiences regarding the stereo_calibration with the pkg camera_calibration. The user has the possibility to "scale" the output via a slider, 0 means that all pixels in the recified image are valid, 1 means that all raw image pixels are shown in the rectified image which results in black/invalid pixels in the rectified image.
Now I chose 0 which gives me a nice image without black pixels in the format 1384 x 372. Now in postprocessing I wrote a script which took out a centered ROI image out of the rectified image. Processing these smaller images gives me a big speed advantage as the algorithm needs more time for larger images. The quality remains approx. the same.
So my question is, do you use mode 0 or 1 for calibrating your stereo_camera. i ímagine mode 0 will lead to a scaling of the image which might be not that great.
Also I am wondering if I can edit my calibration.yaml file in order to publish the ROI I would like to have, e.g. 1344 x 372.
image_width: 1384
image_height: 1032
camera_name: narrow_stereo/right
camera_matrix:
rows: 3
cols: 3
data: [784.208109, 0, 694.421303, 0, 784.143551, 538.7935660000001, 0, 0, 1]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.237837, 0.110405, -0.000362, -0.000231, -0.0294]
rectification_matrix:
rows: 3
cols: 3
data: [0.999918, 0.001983, 0.012625, -0.001971, 0.9999979999999999, -0.001011, -0.012627, 0.0009859999999999999, 0.9999199999999999]
projection_matrix:
rows: 3
cols: 4
data: [879.465343, 0, 687.69413, -529.632434, 0, 879.465343, 657.815979, 0, 0, 0, 1, 0]
Look at this answer