Back to FabImage Library website
You are here: Start » Function Reference » Camera Calibration » DetectCalibrationGrid_Circles
DetectCalibrationGrid_Circles
Header: | FIL.h |
---|---|
Namespace: | fil |
Detects an arbitrary size symmetric circle pattern on the image.
Syntax
C++
C#
void fil::DetectCalibrationGrid_Circles ( const fil::Image& inImage, float inCircleRadius, float inWorldCircleSpacing, float inCircleDetectionMinScore, const ftl::Optional<float>& inMaxCircleSpacing, ftl::Array<fil::Point2D>& outImagePoints, ftl::Array<fil::Point2D>& outWorldPlanePoints, ftl::Array<fil::Circle2D>& diagCircleCandidates )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inImage | const Image& | Input image | ||
![]() |
inCircleRadius | float | 1.0 - ![]() |
Circle radius measured in input image pixels. | |
![]() |
inWorldCircleSpacing | float | 0.0 - ![]() |
1.0f | Real-world distance between adjacent circles centers. |
![]() |
inCircleDetectionMinScore | float | 0.0 - ![]() |
20.0f | Minimum matching score for circle detector. |
![]() |
inMaxCircleSpacing | const Optional<float>& | 1.0 - ![]() |
NIL | Maximum distance between adjacent circle centers in the image measured in pixels. Defaults to 8*inCircleRadius. |
![]() |
outImagePoints | Array<Point2D>& | Image coordinates of detected calibration points. | ||
![]() |
outWorldPlanePoints | Array<Point2D>& | World plane coordinates of detected calibration points. | ||
![]() |
diagCircleCandidates | Array<Circle2D>& | Detected circles, before the grid construction step |
Hints
In a case of sparse circle pattern (i.e. distances between circles relatively large in comparison to their radius), output point arrays may be empty despite properly detected diagCircleCandidates.
In such a case it may be needed to set the inMaxCircleSpacing.
Examples

Input image for DetectCalibrationGrid_Circles executed with inCircleRadius = 5

Detected calibration points
Remarks
The circle pattern must be a rectangular grid, with equal spacing in both dimensions.
Works only for slightly distorted images (circles cannot appear as ellipses).
See Also
- DetectCalibrationGrid_Chessboard – Detects a chessboard calibration grid on the image, and returns calibration points where 4 chessboard squares meet.
- DetectCalibrationGrid_CircleBoard – Detects a fixed-size symmetric circle calibration pattern on the image.