Update Camera Calibration authored by Sebastian Hahta's avatar Sebastian Hahta
......@@ -14,26 +14,75 @@ Useful parameters:
## Stereo calibration
### Pair calibration (2 cameras)
Pair calibration can be done with `ftl-calibrate --stereo`
* `alpha`: scaling parameter (see OpenCV documentation for `stereoRectify()`).
## Extrinsic calibration for all cameras
### 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.
Calibration will calculate extrinsic parameters for all cameras and calculate stereo rectification parameters for each node.
> **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.
#### Options
* `load_input` *false*
Load previously saved calibration data. Set to false to capture data from cameras.
* `save_input` *false*
Save calibration input for debugging purposes or for re-calibration with different parameters. Calibration point and images are saved to `calibration_data_dir`
* `calibration_data_dir` *./*
see save_input and load_input.
* `save_extrinsic` *true*
Save new extrinsic parameters to `output_directory`.
* `save_intrinsic` *false*
Save optimized intrinsic parameters to `output_directory`
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).
* `output_directory` *./*
Registration parameters are saved to file defined in `registration_file`. File is used by `ftl-reconstruct`.
see save_intrinsic and save_extrinsic.
* `registration_file` *FTL_LOCAL_CONFIG_ROOT/registration.json*
Where extrinsic (stereo) parameters are saved (used in reconstruction)
* `optimize_intrinsic` *false*
Intrinsic camera parameters are optimized during bundle adjustment.
* `n_views` *500*
How many times all cameras must see the pattern. **Note:** calibration app does not verify that visibility graph is connected (or how good visibility is).
* `min_visible` *3*
Minimum number of cameras which must see the pattern at the same time. If pattern is visible in less cameras, points are not used.
Calibration application calculates stereo rectification extrinsic parameters and saves them in "<node>-extrinsic.yml" files in directory specified by `output_directory` (this can be on shared folder and nodes can use these directly, or they can be manually copied).
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`.
Intrinsic optimization requires more data than only calibrating extrinsic parameters.
Errors during calibration can be cause by inaccurate intrinsic parameters, not having enough data or having bad data.
Calibration target is two (ID0 and ID1) 10cm ArUco 5x5 markers spaced at 250mm from each other. Template can be downloaded below.
![ArUco5x5_0_1.svg](uploads/0e605aa28dcae2261f3c42c9e514aad3/ArUco5x5_0_1.svg =400px)
# References
* [calib.io: Calibration Best Practices](https://calib.io/blogs/knowledge-base/calibration-best-practices)
* [calib.io: Pattern Generator](https://calib.io/pages/camera-calibration-pattern-generator), note the instructions on printing
......
......