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
Input value inImageGrids list[ list[AnnotatedPoint2D] ] For each view, the annotated calibration grid
Input value inImageWidth int 1 - Image width, used for initial estimation of principal point.
Input value inImageHeight int 1 - Image height, used for initial estimation of principal point.
Input value inDistortionType LensDistortionModelType LensDistortionModelType.Polynomial Lens distortion model
Input value inImagePointsStandardDeviation float 0.0 - 0.1 Assumed uncertainty of inImagePoints. Used for robust optimization and outCameraModelStdDev estimation.
Input value 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].
Output value outCameraModel PinholeCameraModel
Output value outCameraModelStdDev PinholeCameraModel | None None Standard deviations of all model parameters, assuming that inImagePoints positions have a standard deviation equal to inImagePointsStandardDeviation.
Output value outRmsError float Final reprojection RMS error, in pixels.
Output value outMaxReprojectionErrors list[float] For each view: the maximum reprojection error among all points.
Output value outReprojectionErrorSegments list[ list[Segment2D] ] For each view: array of segments connecting input image points to grid reprojections.