Camera intrinsics: rectified or raw images?
Using camera_info
-like YAML files to configure cameras, we find two intrinsic sets of params:
- intrinsic matrix
- projection matrix
The first is to be used, together with the distortion model, when raw images are provided. The second is to be used when rectified images are used.
As of now, we are using always the intrinsic matrix.
However, in Apriltags
branch the rectified-images are used and so the projection matrix is used. This has been achieved by hard-coding the parser in sensor_camera_yaml.cpp
, but this means that all other code using this parser is now wrong.
In particular, the test gtest_constraint_autodiff_trifocal
does not work in branch Apriltags
.
Therefore, we need to provide a method to select between one or the other set of params.
I suggest a boolean is added to the YAML parameters. This is transferred to a parameter in the sensor. Then, the sensor can be used in one way or another depending on this.
Mind that the selected set of intrinsic parameters is the one that ends up being in the intrinsics
state block.