CalibrateCamera_Pinhole
Finds the camera intrinsic parameters from calibration grids. Uses pinhole camera model (perspective camera).
Applications:Computes camera parameters which need to be calculated only once for each camera, and are a prerequisite for other calibration filters.
Syntax
C++
C#
Python
def CalibrateCamera_Pinhole( inImageGrids: list[ list[AnnotatedPoint2D] ], inImageWidth: int, inImageHeight: int, outCameraModel: PinholeCameraModel, /, *, inDistortionType: LensDistortionModelType = LensDistortionModelType.Polynomial, inImagePointsStandardDeviation: float = 0.1, inFocalLength: float | None = None, outCameraModelStdDev: PinholeCameraModel | None = None ) -> ( outRmsError: float, outMaxReprojectionErrors: list[float], outReprojectionErrorSegments: list[ list[Segment2D] ] )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inImageGrids | list[ list[AnnotatedPoint2D] ] | For each view, the annotated calibration grid | ||
![]() |
inImageWidth | int | 1 - ![]() |
Image width, used for initial estimation of principal point. | |
![]() |
inImageHeight | int | 1 - ![]() |
Image height, used for initial estimation of principal point. | |
![]() |
inDistortionType | LensDistortionModelType | LensDistortionModelType.Polynomial | Lens distortion model | |
![]() |
inImagePointsStandardDeviation | float | 0.0 - ![]() |
0.1 | Assumed uncertainty of inImagePoints. Used for robust optimization and outCameraModelStdDev estimation. |
![]() |
inFocalLength | float | None | None | Specify a fixed focal length (do not estimate), in pixels. In order to calculate the inFocalLength from camera parameters one needs to divide the lens focal length [mm] by sensor pitch [mm/pix]. | |
![]() |
outCameraModel | PinholeCameraModel | |||
![]() |
outCameraModelStdDev | PinholeCameraModel | None | None | Standard deviations of all model parameters, assuming that inImagePoints positions have a standard deviation equal to inImagePointsStandardDeviation. | |
![]() |
outRmsError | float | Final reprojection RMS error, in pixels. | ||
![]() |
outMaxReprojectionErrors | list[float] | For each view: the maximum reprojection error among all points. | ||
![]() |
outReprojectionErrorSegments | list[ list[Segment2D] ] | For each view: array of segments connecting input image points to grid reprojections. |



