CalibrateCamera_LineScan


Finds the line scan camera intrinsic parameters from calibration grid.

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_LineScan(
	inImageGrid: list[AnnotatedPoint2D],
	inGridSpacing: float,
	inImageWidth: int,
	outCameraModel: LineScanCameraModel,
	/,
	*,
	inDistortionType: LensDistortionModelType = LensDistortionModelType.Polynomial,
	inImagePointsStandardDeviation: float = 0.1,
	inFocalLength: float | None = None
)
-> (
	outApproxScaleRatio: float,
	outRmsError: float,
	outMaxReprojectionError: float,
	outReprojectionErrorSegments: list[Segment2D]
)

Parameters

Name Type Range Default Description
Input value inImageGrid list[AnnotatedPoint2D] Annotated calibration grid
Input value inGridSpacing float 0.000001 - Real-world distance between adjacent grid points.
Input value inImageWidth int 1 - Image width, 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.
Input value inFocalLength float | None None Specify a fixed focal length, 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 LineScanCameraModel
Output value outApproxScaleRatio float Approximate scale ratio between Y and X. Useful for camera/encoder trigger rate configuration. When greater than 1, the image is stretched in Y dimension, when less than 1 it is compressed.
Output value outRmsError float Final reprojection RMS error, in pixels.
Output value outMaxReprojectionError float Maximum reprojection error among all points.
Output value outReprojectionErrorSegments list[Segment2D] Array of segments connecting input image points to grid reprojections.