# CalibratePoints

The CalibratePoints function is used to compute transformations with correct perspective (linear) and lens (non-linear) distortions.

## CalibratePoints Overview

CalibratePoints uses a reference to a set of calibration points and a lens distortion model to compute a transformation mapping between image and real-world coordinates. It can be used in any calibration tool which requires a Calib data structure as input.

## CalibratePoints Inputs

Parameter | Description
--- | ---
Calibration Points | Reference to a cell containing a CalibPoints data structure which will be used to construct the coordinate transform.
Lens Distortion | The linear or non-linear lens distortion model to use in mapping real world to image coordinates.
0 = No lens distortion | Only account for perspective distortion.
1 = Center radial distortion | Account for minor radial distortion that originates from the center of the image.
2 = Off-center radial distortion | Account for radial distortion originating from areas other than the center of the image.
3 = Projection distortion | Account for distortion caused by fish-eye and wide-angle lenses
4 = Broad distortion | Account for lens distortion ranging from minor to sever.
Timeout | Specifies a length of time (milliseconds) to allow the CalibratePoints function to run. Function execution stops when the time out has been exceeded. (Minimum = 0, Maximum = 9999999, Default = 30000) Note: 0 disables the timeout feature.

## CalibratePoints Outputs

Returns | A Calib data structure which can be used as an input to any calibration tool requiring a transformation such as TransformImage, TransWorldToPixel, CalibrateImage, etc.