|
Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
|
Cameras are configured using the following configuration file format. The specification given is in general terms, and the example is given in YAML; however, XML and JSON are also supported. Please see the OpenCV documentation on persistent file storage for more details.
The top level of the configuration file should be a key-value mapping, with the following top-level keys:
extrinsic_params: Optional. Should be a 4x4 matrix defining a transformation from 3-dimensional coordinates in the camera's frame of reference to the rover's frame of reference. This matrix should ideally have a 3x3 rotation matrix in the first three rows and columns, and the first three rows in the fourth column should be a translation vector. The fourth row should be 0, 0, 0, 1 so that homogeneous coordinates (4-dimensional coordinates where the 4th coordinate is 1) can be used.
Note that in the rover's frame of reference, the positive x-axis is towards the front, the positive y-axis is towards the left, and the positive z-axis is towards the top; in the camera's frame of reference, the positive x-axis is to the right (parallel to the image plane), the positive y-axis is down, and the positive z-axis is in the direction the camera is pointing.
Intrinsic parameters are represented as a key-value mapping, with the following keys:
Calibration information is saved by the calibration program, and provides some data relevant to the calibration process, such as the time and date of calibration, the size of the board used, and the reprojection error. You should not need to fill this section of the configuration file out yourself.
Probably the most important part of this section if it is present is avg_reprojection_error. The calibration process computes a projection matrix for the camera; multiplying the coordinates of a point in space as a column vector by this matrix will give the location they should appear in the image. The reprojection error is the distance between the computed projection and the actual location of the point in the image, and is measured in pixels; the lower this number, the better. A general rule of thumb is that you should try to aim for less than 1 pixel.