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 | |
|---|---|---|---|---|---|
![]() |
inImageGrid | list[AnnotatedPoint2D] | Annotated calibration grid | ||
![]() |
inGridSpacing | float | 0.000001 - ![]() |
Real-world distance between adjacent grid points. | |
![]() |
inImageWidth | int | 1 - ![]() |
Image width, 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. |
![]() |
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]. | |
![]() |
outCameraModel | LineScanCameraModel | |||
![]() |
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. | ||
![]() |
outRmsError | float | Final reprojection RMS error, in pixels. | ||
![]() |
outMaxReprojectionError | float | Maximum reprojection error among all points. | ||
![]() |
outReprojectionErrorSegments | list[Segment2D] | Array of segments connecting input image points to grid reprojections. |



