This class implements utility functions for calibration.
More...
#include <Utilities.h>
|
static bool | paintCalibrationBoardOutline (Frame &frame, const AnyCamera &camera, const HomogenousMatrix4 &board_T_camera, const MetricCalibrationBoard &calibrationBoard, const uint8_t *color, const unsigned int thickness=1u) |
| Paints the outline of a calibration board.
|
|
static bool | paintCalibrationBoardObservation (Frame &frame, const MetricCalibrationBoard &calibrationBoard, const CalibrationBoardObservation &calibrationBoardObservation, const bool drawCorrespondences) |
| Paints the observation information of a calibration board.
|
|
static Frame | visualizeDistortionGrid (const AnyCamera &camera, const unsigned int horizontalBins, const unsigned int verticalBins, const bool undistort, Worker *worker=nullptr) |
| Visualizes the distortion of a camera with a grid.
|
|
static Frame | visualizeDistortionVectors (const AnyCamera &camera, const unsigned int horizontalBins, const unsigned int verticalBins) |
| Visualizes the distortion of a camera with displacement vectors.
|
|
static bool | parseCalibrationBoard (const std::string &calibrationBoardType, CalibrationBoard &calibrationBoard) |
| Parses the type of a calibration board from a string.
|
|
static bool | parseMarkerDimension (const std::string &markerDimension, int32_t &horizontalMarkers, int32_t &verticalMarkers) |
| Parses the marker dimension from a string.
|
|
static CalibrationBoard | createBoardForPaper (const MetricSize::PaperType paperType, const unsigned int id, MetricSize *paperWidth=nullptr, MetricSize *paperHeight=nullptr) |
| Returns an ideal calibration board for a specific paper type.
|
|
This class implements utility functions for calibration.
◆ createBoardForPaper()
Returns an ideal calibration board for a specific paper type.
- Parameters
-
paperType | The type of the paper to be used, must be valid |
id | The id of the calibration board, with range [0, infinity) |
paperWidth | Optional resulting width of the paper, nullptr if not of interest |
paperHeight | Optional resulting height of the paper, nullptr if not of interest |
- Returns
- The calibration board optimized for the specified paper type, invalid if the calibration board could not be created
◆ paintCalibrationBoardObservation()
Paints the observation information of a calibration board.
- Parameters
-
frame | The frame to which the observation information will be painted, must be valid |
calibrationBoard | The calibration board for which the observation information will be painted, must be valid |
calibrationBoardObservation | The observation information of the calibration board, must be valid |
drawCorrespondences | True to draw the 2D/3D correspondences of the observation; False, to draw the projected 3D object points of all visible marker points |
- Returns
- True, if succeeded
◆ paintCalibrationBoardOutline()
static bool Ocean::CV::Calibration::Utilities::paintCalibrationBoardOutline |
( |
Frame & |
frame, |
|
|
const AnyCamera & |
camera, |
|
|
const HomogenousMatrix4 & |
board_T_camera, |
|
|
const MetricCalibrationBoard & |
calibrationBoard, |
|
|
const uint8_t * |
color, |
|
|
const unsigned int |
thickness = 1u |
|
) |
| |
|
static |
Paints the outline of a calibration board.
- Parameters
-
frame | The frame to which the outline will be painted, must be valid |
camera | The camera profile defining the projection, must be valid |
board_T_camera | The camera pose transforming camera to board, with default camera looking towards the negative z-space with y-axis upwards, must be valid |
calibrationBoard | The calibration board for which the outline will be painted, must be valid |
color | The color of the outline, must be valid |
thickness | The thickness of the outline, possible values are {1, 3, 5, 7} |
- Returns
- True, if succeeded
◆ parseCalibrationBoard()
static bool Ocean::CV::Calibration::Utilities::parseCalibrationBoard |
( |
const std::string & |
calibrationBoardType, |
|
|
CalibrationBoard & |
calibrationBoard |
|
) |
| |
|
static |
Parses the type of a calibration board from a string.
The string must have the format 'calibrationBoard_<Id>_<HorizontalMarkers>x<VerticalMarkers> - e.g., 'calibrationBoard_0_8x13'
- Parameters
-
calibrationBoardType | The string with the calibration board type to parse |
calibrationBoard | The resulting calibration board |
- Returns
- True, if succeeded
◆ parseMarkerDimension()
static bool Ocean::CV::Calibration::Utilities::parseMarkerDimension |
( |
const std::string & |
markerDimension, |
|
|
int32_t & |
horizontalMarkers, |
|
|
int32_t & |
verticalMarkers |
|
) |
| |
|
static |
Parses the marker dimension from a string.
The string must have the format '<HorizontalMarkers>x<VerticalMarkers>' - e.g., '8x13'
- Parameters
-
markerDimension | The string with the marker dimension to parse |
horizontalMarkers | The resulting number of horizontal markers, with range [1, infinity) |
verticalMarkers | The resulting number of vertical markers, with range [1, infinity) |
- Returns
- True, if succeeded
◆ visualizeDistortionGrid()
static Frame Ocean::CV::Calibration::Utilities::visualizeDistortionGrid |
( |
const AnyCamera & |
camera, |
|
|
const unsigned int |
horizontalBins, |
|
|
const unsigned int |
verticalBins, |
|
|
const bool |
undistort, |
|
|
Worker * |
worker = nullptr |
|
) |
| |
|
static |
Visualizes the distortion of a camera with a grid.
- Parameters
-
camera | The camera profile for which the distortion/undistortion is visualized, must be valid |
horizontalBins | Number of horizontal bins, with range [1, camera.width() / 2u) |
verticalBins | Number of vertical bins, with range [1, camera.height() / 2u) |
undistort | True, to visualize the undistorted frame, otherwise the distorted frame is visualized |
worker | Optional worker object to distribute the computation |
- Returns
- Resulting frame with visualized distortion/undistortion
◆ visualizeDistortionVectors()
static Frame Ocean::CV::Calibration::Utilities::visualizeDistortionVectors |
( |
const AnyCamera & |
camera, |
|
|
const unsigned int |
horizontalBins, |
|
|
const unsigned int |
verticalBins |
|
) |
| |
|
static |
Visualizes the distortion of a camera with displacement vectors.
- Parameters
-
camera | The camera profile for which the distortion is visualized, must be valid |
horizontalBins | Number of horizontal bins, with range [1, camera.width() / 2] |
verticalBins | Number of vertical bins, with range [1, camera.height() / 2] |
- Returns
- Resulting distortion frame with visualized distortion
The documentation for this class was generated from the following file: