... | ... | @@ -6,24 +6,33 @@ Calibration options can be passed via command line to `ftl-calibrate`. Possible |
|
|
|
|
|
Intrinsic calibration parameters are stored in `~/.config/ftl/intrinsics.yml`. Intrinsic parameters do not change and it should not be necessary to re-calibrate once good calibration is acquired.
|
|
|
|
|
|
Intrinsic parameters are used to correct lens distortions, so it is important that the pattern is on as flat surface as possible (so distortion from board's shape is much less than lens distortion).
|
|
|
|
|
|
## Stereo calibration
|
|
|
|
|
|
Stereo calibration pattern should be shown in various distances and angles. Calibration grid helps and is enabled by default (can be disabled with `use_grid`, note that `iter` and `delay` should likely also be adjusted).
|
|
|
Intrinsic parameters are used to correct lens distortions, so it is important that the pattern is on as flat surface as possible (so distortion from board's shape is much less than lens distortion). Pattern should be shown in various angles and cameras field of view should be completely covered by the patterns (in multiple images).
|
|
|
|
|
|
Useful parameters:
|
|
|
* `iter`: In grid mode, how many grids are required for calibration. In normal mode, how many calibration pattern views are required.
|
|
|
* `delay`: (approximate) delay between attempts to capture the pattern.
|
|
|
|
|
|
## Stereo calibration
|
|
|
|
|
|
### Pair calibration (2 cameras)
|
|
|
|
|
|
Pair calibration can be done with `ftl-calibrate --stereo`
|
|
|
|
|
|
* `alpha`: scaling parameter (see OpenCV documentation for `stereoRectify()`).
|
|
|
|
|
|
Final RMS error should be less than 0.5
|
|
|
### Extrinsic calibration for all cameras (3+ cameras)
|
|
|
|
|
|
Extrinsic parameters for all cameras can be calibrated using `calibrate-multi` application. Possible configuration options are visible on start.
|
|
|
|
|
|
> **IMPORTANT:** `use_intrinsics` must be set false on nodes before running calibration (disables rectification, unrectified images and parameters are used).
|
|
|
|
|
|
`n_views` defines how many times all cameras must see the pattern. `min_visible` sets minimum number of cameras which must see the pattern at the same time.
|
|
|
|
|
|
Parameters are stored in `~/.config/ftl/extrinsics.yml`.
|
|
|
Calibration application calculates rectification extrinsic parameters and saves them in "<node>-extrinsic.yml" files in directory specified by `extrinsic_directory` (this can be on shared folder and nodes can use these directly, or they can be manually copied).
|
|
|
|
|
|
## Notes
|
|
|
Registration parameters are saved to file defined in `registration_file`. File is used by `ftl-reconstruct`.
|
|
|
|
|
|
> The function requires white space (like a square-thick border, the wider the better) around the board to make the detection more robust in various environments. Otherwise, if there is no border and the background is dark, the outer black squares cannot be segmented properly and so the square grouping and ordering algorithm fails. [[src]](https://docs.opencv.org/4.1.0/d9/d0c/group__calib3d.html#ga93efa9b0aa890de240ca32b11253dd4a)
|
|
|
Calibration input is saved when `save_input` is enabled. Files (images and data file) are saved in directory set in `calibration_data_dir`. Calibration can be re-run from the data by enabling `load_input`.
|
|
|
|
|
|
# References
|
|
|
* [calib.io: Calibration Best Practices](https://calib.io/blogs/knowledge-base/calibration-best-practices)
|
... | ... | |