Typedefs | |
using | CameraModelTypeList = TypeList< CameraModelOpenCV, CameraModelOpenCVFisheye, CameraModelDoubleSphere, CameraModelEnhancedUnified, CameraModelCentralBSpline, CameraModelThinPrism, CameraModelMatlab, CameraModelFOV, CameraModelHalconDivision, CameraModelBrownConrady > |
typedef std::map< std::string, OptionalSetting > | OptionalSettings |
typedef Image< uint8_t > | Image1b |
typedef Image< std::array< uint8_t, 3 > > | Image3b |
typedef Image< float > | Image1f |
typedef Image< double > | Image1d |
Functions | |
LIBCALIB_API RPEStatistics | residualStatistics (const std::vector< DetectionResiduals > &detectionResiduals) |
LIBCALIB_API Image3b | errorDirectionsMap (const std::vector< Point2 > featurePoints, const std::vector< Point2 > residuals, const ImageSize &imageSize) |
LIBCALIB_API Image3b | errorMagnitudesMap (const std::vector< Point2 > featurePoints, const std::vector< Point2 > residuals, const ImageSize &imageSize) |
LIBCALIB_API std::vector< std::pair< Image3b, Image3b > > | errorMaps (const std::vector< DetectionResiduals > &detectionResiduals, const std::vector< ImageSize > imageDimensions) |
LIBCALIB_API std::pair< Image< double >, double > | kernelDensityEstimate (const std::vector< DetectionResiduals > &detectionResiduals) |
LIBCALIB_API Image3b | errorScatterPlot (const std::vector< Point2 > residuals, const ImageSize &imageSize) |
LIBCALIB_API IntrinsicsComparison | compareIntrinsics (const Camera &cameraA, const Camera &cameraB) |
LIBCALIB_API void | covarSaddlePoint (const Image< uint8_t > &image, const std::vector< Point2 > &saddlePoints, std::vector< PixelCovariance > &covars) |
LIBCALIB_API bool | findSymmetricCirclesGrid (const Image< uint8_t > &image, const PatternSize &size, const CircleContrast contrast, std::vector< Point2 > &circleCenters, std::vector< double > &circleRadii) |
LIBCALIB_API bool | findAsymmetricCirclesGrid (const Image< uint8_t > &image, const PatternSize &size, const CircleContrast contrast, std::vector< Point2 > &circleCenters, std::vector< double > &circleRadii) |
LIBCALIB_API bool | findPartialCirclesGrid (const Image< uint8_t > &image, const CircleContrast contrast, const double circleSpacing, std::vector< Point2 > &q, std::vector< Point3 > &Q, std::vector< double > &circleRadii) |
LIBCALIB_API bool | findCheckerBoard (const Image< uint8_t > &image, const PatternSize &size, std::vector< Point2 > &saddlePoints) |
LIBCALIB_API bool | findCheckerBoardMarker (const Image< uint8_t > &image, const PatternSize &size, const int markerRow, const int markerCol, std::vector< Point2 > &saddlePoints, std::vector< size_t > &ids) |
LIBCALIB_API bool | findChAruCoBoard (const Image< uint8_t > &image, const PatternSize &size, std::vector< Point2 > &saddlePoints, std::vector< size_t > &ids, const ArucoDictionary dictionary=ArucoDictionary::DICT_5X5, const int firstId=0, const double markerSize=7.0/9.0, const std::map< std::string, OptionalSetting > &optSettings=OptionalSettings()) |
LIBCALIB_API bool | findChAruCoBoards (const Image< uint8_t > &image, const PatternSize &size, std::vector< std::vector< Point2 > > &saddlePoints, std::vector< std::vector< size_t > > &ids, const ArucoDictionary dictionary=ArucoDictionary::DICT_5X5, const std::vector< int > firstIds=std::vector< int >(), const double markerSize=7.0/9.0, const std::map< std::string, OptionalSetting > &optSettings=OptionalSettings()) |
LIBCALIB_API bool | findAruCoTargets (const Image< uint8_t > &image, std::vector< std::vector< Point2 > > &saddlePoints, std::vector< size_t > &ids, const ArucoDictionary dictionary=ArucoDictionary::DICT_5X5, const OptionalSettings &optSettings=OptionalSettings()) |
LIBCALIB_API bool | findAruCoMarkers (const Image< uint8_t > &image, std::vector< std::vector< Point2 > > &corners, std::vector< size_t > &ids, const ArucoDictionary dictionary=ArucoDictionary::DICT_5X5, const OptionalSettings &optSettings=OptionalSettings()) |
LIBCALIB_API std::vector< Point3 > | createAprilGridObjectPoints (const int rows, const int cols, const double tagSize, const double tagSpacing) |
bool | findAprilGrid (const Image< uint8_t > &image, const PatternSize &size, std::vector< Point2 > &corners, std::vector< size_t > &ids, const int firstId=0) |
LIBCALIB_API bool | find3DCirclesTarget (const Image< uint8_t > &image, const std::vector< Point3 > &objectPoints, const std::vector< size_t > &markerIds, const double &focalLength, std::vector< Point2 > &featurePoints, std::vector< size_t > &featureIds, RotoTranslation &pose) |
LIBCALIB_API bool | pointsCollinear (const std::vector< Point3 > &Q) |
LIBCALIB_API bool | constrainHomography (const std::vector< Point2 > &a, const std::vector< Point2 > &b) |
LIBCALIB_API bool | initializeCameraParametersZhang (const std::vector< std::vector< Point3 > > &worldPoints, const std::vector< std::vector< Point2 > > &imagePoints, double &f, double &ar, double &cx, double &cy, std::vector< Rotation > &Rw, std::vector< Translation > &Tw) |
bool | initializeCameraParametersVanishingPoints (const std::vector< std::vector< Point3 > > &worldPoints, const std::vector< std::vector< Point2 > > &imagePoints, const size_t imageWidth, const size_t imageHeight, double &f, double &ar, std::vector< Rotation > &Rw, std::vector< Translation > &Tw, const bool estimateAspectRatio=false) |
LIBCALIB_API bool | initializeCameraParametersFisheye (const std::vector< std::vector< Point3 > > &worldPoints, const std::vector< std::vector< Point2 > > &imagePoints, const size_t imageWidth, const size_t imageHeight, double &f, double &ar, double &cx, double &cy, std::vector< Rotation > &Rw, std::vector< Translation > &Tw) |
LIBCALIB_API bool | initializeCameraParametersTsai (const std::vector< Point3 > &worldPoints, const std::vector< Point2 > &imagePoints, const int imageWidth, const int imageHeight, double &f, double &ar, double &Cx, double &Cy, double &kappa1, Rotation &Rw, Translation &Tw) |
LIBCALIB_API void | meanRelativeRotoTranslation (const std::vector< Rotation > &Rwc1, const std::vector< Translation > &Twc1, const std::vector< Rotation > &Rwc2, const std::vector< Translation > &Twc2, Rotation &R, Translation &T) |
LIBCALIB_API void | medianRotoTranslation (const std::vector< RotoTranslation > &Twc, RotoTranslation &T) |
LIBCALIB_API void | medianRelativeRotoTranslation (const std::vector< Rotation > &Rwc1, const std::vector< Translation > &Twc1, const std::vector< Rotation > &Rwc2, const std::vector< Translation > &Twc2, Rotation &R, Translation &T) |
LIBCALIB_API bool | checkLicense () |
LIBCALIB_API bool | activateMachineLicense () |
LIBCALIB_API bool | activateMachineLicense (const std::string &key) |
LIBCALIB_API bool | deactivateMachineLicense () |
LIBCALIB_API void | subpixSaddlePointFoerstner (const Image< uint8_t > &image, const int windowHalfWidth, std::vector< Point2 > &saddlePoints, const int maxIterations=100) |
LIBCALIB_API void | subpixSaddlePointCrossing (const Image< uint8_t > &image, const int windowHalfWidth, std::vector< Point2 > &saddlePoints) |
LIBCALIB_API void | subpixSaddlePointPolynomium (const Image< uint8_t > &image, const int windowHalfWidth, std::vector< Point2 > &saddlePoints, const int maxIterations=100) |
LIBCALIB_API bool | subpixSaddlePointSymmetry (const Image< uint8_t > &image, const int windowHalfWidth, const std::vector< Point3 > &objectPoints, std::vector< Point2 > &saddlePoints, const int maxIterations=100) |
LIBCALIB_API bool | subpixCircleEllipseFit (const Image< uint8_t > &image, const std::vector< Point3 > &objectPoints, std::vector< Point2 > &circleCenters, const std::vector< double > &circleRadii, const bool perspectiveBiasCorrection=true) |
LIBCALIB_API void | subpixCircleNonLinear (const Image< uint8_t > &image, const CircleContrast contrast, std::vector< Point2 > &circleCenters, std::vector< double > &circleRadii, const int maxIterations=100, const double maxRotationRad=M_PI/2, const double maxRadiusChageFactor=std::numeric_limits< double >::infinity()) |
template<typename T > | |
void | saveToDisk (const T &object, const std::string &filePath, const bool binary=false) |
template<typename T > | |
void | loadFromDisk (T &object, const std::string &filePath, const bool binary=false) |
Declares functions for analysis of reprojection errors.
(c) Calib.io ApS
Declares the Calibrator class which is the main interface in libCalib.
(c) Calib.io ApS
Camera.h – Declares the data type representing a physical camera.
(c) Calib.io ApS
Base classes for all camera model classes.
(c) Calib.io ApS
Factory class for camera models.
(c) Calib.io ApS
Fisheye camera model with parameters exactly corresponding to OpenCV's and Buguet's fisheye model. Implements Brandt/Kannala's fisheye model with equidistance projection.
Should usually be initialized using initializeCameraParametersFisheye().
J. Kannala, and S. Brandt, A Generic Camera Model and Calibration Method for Conventional, Wide-Angle, and Fish-Eye Lenses, PAMI 2006
Declares functions for target detection in images.
(c) Calib.io ApS
Declares linear initialization routines for camera calibration. Users would normally don't have to call these but use the Calibrator class instead.
(c) Calib.io ApS
Defines common, simple types based on pure C++ which are used throughout libCalib.
(c) Calib.io ApS
LIBCALIB_API bool libCalib::activateMachineLicense | ( | ) |
Will try to activate the current machine online with key found in global environment variable LIBCALIB_LICENSE_KEY.
LIBCALIB_API bool libCalib::activateMachineLicense | ( | const std::string & | key | ) |
Will try to activate the current machine online.
LIBCALIB_API bool libCalib::checkLicense | ( | ) |
Performs a check of whether the executing machine is registered.
If not will try to activate the current machine online with key found in global environment variable LIBCALIB_LICENSE_KEY.
LIBCALIB_API bool libCalib::constrainHomography | ( | const std::vector< Point2 > & | a, |
const std::vector< Point2 > & | b | ||
) |
Tests whether a set of 2d to 2d correspondences constrain a unique homography. This is generally a requirement for partial observations to be initialized with Zhang's method. Can also be used with a == b on the object points only.
LIBCALIB_API std::vector< Point3 > libCalib::createAprilGridObjectPoints | ( | const int | rows, |
const int | cols, | ||
const double | tagSize, | ||
const double | tagSpacing | ||
) |
Create the object points for a Kalibr-style Aprilgrid
tagSize refers to the size of the coded Apriltag square itself. tagSpacing is the ratio of small black square to tagSize.
point ordering: (e.g. 2x2 grid) 12--—13 14--—15 | TAG 3 | | TAG 4 | 8----—9 10--—11 4----—5 6----—7 y | TAG 1 | | TAG 2 | ^ 0----—1 2----—3 |-->x
LIBCALIB_API bool libCalib::deactivateMachineLicense | ( | ) |
Will deactive the current machine online (e.g. when changing hardware parts). Subject to limitations according to license agreement.
LIBCALIB_API bool libCalib::find3DCirclesTarget | ( | const Image< uint8_t > & | image, |
const std::vector< Point3 > & | objectPoints, | ||
const std::vector< size_t > & | markerIds, | ||
const double & | focalLength, | ||
std::vector< Point2 > & | featurePoints, | ||
std::vector< size_t > & | featureIds, | ||
RotoTranslation & | pose | ||
) |
Find 3D circles targets such as a OneShot target or a step-target. Assumes white circles on dark background and dark marker circles.
bool libCalib::findAprilGrid | ( | const Image< uint8_t > & | image, |
const PatternSize & | size, | ||
std::vector< Point2 > & | corners, | ||
std::vector< size_t > & | ids, | ||
const int | firstId = 0 |
||
) |
Find a Kalibr-style Aprilgrid. size refers to the number of tags in x and y. Each tag has four feature points/corners.
LIBCALIB_API bool libCalib::findAruCoMarkers | ( | const Image< uint8_t > & | image, |
std::vector< std::vector< Point2 > > & | corners, | ||
std::vector< size_t > & | ids, | ||
const ArucoDictionary | dictionary = ArucoDictionary::DICT_5X5 , |
||
const OptionalSettings & | optSettings = OptionalSettings() |
||
) |
Find standard AruCo based markers. No saddle-point subpixel refinement is performed.
LIBCALIB_API bool libCalib::findAruCoTargets | ( | const Image< uint8_t > & | image, |
std::vector< std::vector< Point2 > > & | saddlePoints, | ||
std::vector< size_t > & | ids, | ||
const ArucoDictionary | dictionary = ArucoDictionary::DICT_5X5 , |
||
const OptionalSettings & | optSettings = OptionalSettings() |
||
) |
Find Calib.io AruCo based coded targets (with 4 saddle points surrounding a regular AruCo marker). No saddle-point subpixel refinement is performed.
LIBCALIB_API bool libCalib::findAsymmetricCirclesGrid | ( | const Image< uint8_t > & | image, |
const PatternSize & | size, | ||
const CircleContrast | contrast, | ||
std::vector< Point2 > & | circleCenters, | ||
std::vector< double > & | circleRadii | ||
) |
Find an asymmetric circles grid. No subpixel circle fitting is performed.
LIBCALIB_API bool libCalib::findChAruCoBoard | ( | const Image< uint8_t > & | image, |
const PatternSize & | size, | ||
std::vector< Point2 > & | saddlePoints, | ||
std::vector< size_t > & | ids, | ||
const ArucoDictionary | dictionary = ArucoDictionary::DICT_5X5 , |
||
const int | firstId = 0 , |
||
const double | markerSize = 7.0/9.0 , |
||
const std::map< std::string, OptionalSetting > & | optSettings = OptionalSettings() |
||
) |
Find ChAruCo board. No saddle-point subpixel refinement is performed. Calib.io ChAruCo boards have dictionary DICT_5X5_1000 by default.
firstId | The first ArUco id on the board to be detected. |
markerSize | The relative size of the ArUco marker relative to the checker size. Default 7.0/9.0. |
LIBCALIB_API bool libCalib::findChAruCoBoards | ( | const Image< uint8_t > & | image, |
const PatternSize & | size, | ||
std::vector< std::vector< Point2 > > & | saddlePoints, | ||
std::vector< std::vector< size_t > > & | ids, | ||
const ArucoDictionary | dictionary = ArucoDictionary::DICT_5X5 , |
||
const std::vector< int > | firstIds = std::vector< int >() , |
||
const double | markerSize = 7.0/9.0 , |
||
const std::map< std::string, OptionalSetting > & | optSettings = OptionalSettings() |
||
) |
Find multiple ChAruCo board in the same image. No saddle-point subpixel refinement is performed. Calib.io ChAruCo boards have dictionary DICT_5X5_1000 by default. This function is faster and more accurate than calling findChAruCoBoard() multiple times.
firstIds | The first ArUco ids on the boards to be detected. |
markerSize | The relative size of the ArUco marker relative to the checker size. Default 7.0/9.0. |
LIBCALIB_API bool libCalib::findCheckerBoard | ( | const Image< uint8_t > & | image, |
const PatternSize & | size, | ||
std::vector< Point2 > & | saddlePoints | ||
) |
Find checkerboard. No saddle-point subpixel refinement is performed. Input must be 8bit grayscale.
LIBCALIB_API bool libCalib::findCheckerBoardMarker | ( | const Image< uint8_t > & | image, |
const PatternSize & | size, | ||
const int | markerRow, | ||
const int | markerCol, | ||
std::vector< Point2 > & | saddlePoints, | ||
std::vector< size_t > & | ids | ||
) |
Find checkerboard with central marker. No saddle-point subpixel refinement is performed. Input must be 8bit grayscale.
LIBCALIB_API bool libCalib::findPartialCirclesGrid | ( | const Image< uint8_t > & | image, |
const CircleContrast | contrast, | ||
const double | circleSpacing, | ||
std::vector< Point2 > & | q, | ||
std::vector< Point3 > & | Q, | ||
std::vector< double > & | circleRadii | ||
) |
Find a partial circles grid. The grid has to be regular, but parts of it may be obscured or outside the FOV. No subpixel circle fitting is performed.
LIBCALIB_API bool libCalib::findSymmetricCirclesGrid | ( | const Image< uint8_t > & | image, |
const PatternSize & | size, | ||
const CircleContrast | contrast, | ||
std::vector< Point2 > & | circleCenters, | ||
std::vector< double > & | circleRadii | ||
) |
Find a symmetric circles grid. No subpixel circle fitting is performed.
LIBCALIB_API bool libCalib::initializeCameraParametersFisheye | ( | const std::vector< std::vector< Point3 > > & | worldPoints, |
const std::vector< std::vector< Point2 > > & | imagePoints, | ||
const size_t | imageWidth, | ||
const size_t | imageHeight, | ||
double & | f, | ||
double & | ar, | ||
double & | cx, | ||
double & | cy, | ||
std::vector< Rotation > & | Rw, | ||
std::vector< Translation > & | Tw | ||
) |
Initialize camera intrinsics and extrinsics for a planar calibration target for a fisheye camera. Based on Bouguet's method for initializing the Brandt/Kannala model. Reference: A Generic Camera Model and Calibration Method for Conventional, Wide-Angle, and Fish-Eye Lenses. Reference: Jean-Yves Bouguet, Camera Calibration Toolbox for Matlab
LIBCALIB_API bool libCalib::initializeCameraParametersTsai | ( | const std::vector< Point3 > & | worldPoints, |
const std::vector< Point2 > & | imagePoints, | ||
const int | imageWidth, | ||
const int | imageHeight, | ||
double & | f, | ||
double & | ar, | ||
double & | Cx, | ||
double & | Cy, | ||
double & | kappa1, | ||
Rotation & | Rw, | ||
Translation & | Tw | ||
) |
Initialize camera intrinsics and extrinsics for a 3D calibration target by means of Tsai's method. Reference: R.Y. Tsai, An Efficient and Accurate Camera Calibration Technique for 3D Machine Vision (1986). A very intuitive analysis if given in: B.K.P. Horn, Tsai's camera calibration method revisited (2000).
Note that the function makes a few iterations of non-linear optimization.
bool libCalib::initializeCameraParametersVanishingPoints | ( | const std::vector< std::vector< Point3 > > & | worldPoints, |
const std::vector< std::vector< Point2 > > & | imagePoints, | ||
const size_t | imageWidth, | ||
const size_t | imageHeight, | ||
double & | f, | ||
double & | ar, | ||
std::vector< Rotation > & | Rw, | ||
std::vector< Translation > & | Tw, | ||
const bool | estimateAspectRatio = false |
||
) |
Initialize camera intrinsics and extrinsics for a planar calibration target by means of Bouguet's method. This is identical to Zhang's for extrinsics estimation, but uses vanishing points for focal length estimation. Central point coordinates are assumed to be in the image center. Reference: Jean-Yves Bouguet, Camera Calibration Toolbox for Matlab http://www.vision.caltech.edu/bouguetj/calib_doc/.
LIBCALIB_API bool libCalib::initializeCameraParametersZhang | ( | const std::vector< std::vector< Point3 > > & | worldPoints, |
const std::vector< std::vector< Point2 > > & | imagePoints, | ||
double & | f, | ||
double & | ar, | ||
double & | cx, | ||
double & | cy, | ||
std::vector< Rotation > & | Rw, | ||
std::vector< Translation > & | Tw | ||
) |
Initialize camera intrinsics and extrinsics for a planar calibration target by means of Zhang's method. Reference: Zhang, Z., A Flexible New Technique for Camera Calibration (2002).
LIBCALIB_API void libCalib::meanRelativeRotoTranslation | ( | const std::vector< Rotation > & | Rwc1, |
const std::vector< Translation > & | Twc1, | ||
const std::vector< Rotation > & | Rwc2, | ||
const std::vector< Translation > & | Twc2, | ||
Rotation & | R, | ||
Translation & | T | ||
) |
Determine the mean rotation and translation between two cameras from corresponding target extrinsics.
LIBCALIB_API void libCalib::medianRelativeRotoTranslation | ( | const std::vector< Rotation > & | Rwc1, |
const std::vector< Translation > & | Twc1, | ||
const std::vector< Rotation > & | Rwc2, | ||
const std::vector< Translation > & | Twc2, | ||
Rotation & | R, | ||
Translation & | T | ||
) |
Determine the "median" rotation and translation between two cameras from corresponding target extrinsics.
LIBCALIB_API void libCalib::medianRotoTranslation | ( | const std::vector< RotoTranslation > & | Twc, |
RotoTranslation & | T | ||
) |
Determine a "median" rototranslation.
LIBCALIB_API bool libCalib::pointsCollinear | ( | const std::vector< Point3 > & | Q | ) |
Tests whether a set of 3d points are colinear. This is useful for removing partial views of calibration targets which cannot be used for initialization and optimization anyways.