# UltraCalibration Loop

The UltraCalibration process models non-linearities in the mapping from commanded motion device pose to actual motion device pose. The calibration process is very similar to the Hand-eye calibration process. The UltraCalibrationLoopBlock serves the same purpose as the HandEyeCalibrationLoopBlock. It has a set of properties that specify the motion range of the motion device, and properties that influence the number of poses for the calibration target. During the calibration process the block enables the vision application to move the calibration target to random positions within the specified range. The recommended X, Y, Theta Step for UltraCalibration is 4-7.

## General Information

Class name: UltraCalibrationLoopBlock

Namespace: Cognex.Designer.AlignPlus.Calibration

Assembly: Cognex.Designer.AlignPlus.Calibration.dll

## Properties

Name | Type | Description
--- | --- | ---
Theta Range Start | Double | Get/Set the starting position for the Theta axis (in degrees), used when generating stage poses on the circular grid.
Theta Range End | Double | Get/Set the ending position for the Theta axis (in degrees), used when generating stage poses on the circular grid.
Number of Steps on Theta axis | Double | Get/Set the number of samples when rotating the stage along the Theta axis of the circular grid. This property has a minimum value of 1. Throws System.ArgumentOutOfRangeException: If the setter value is less than one.
X Range Start | Double | Get/Set the starting position for the X axis (in mm), used when generating stage poses on the circular grid.
X Range End | Double | Get/Set the ending position for the X axis (in mm), used when generating stage poses on the circular grid.
Number of Steps on X axis | Double | Get/Set the number of samples when rotating the stage along the X axis of the circular grid. This property has a minimum value of 1. Throws System.ArgumentOutOfRangeException: If the setter value is less than one.
X Range Start | Double | Get/Set the starting position for the Y axis (in mm), used when generating stage poses on the circular grid.
X Range End | Double | Get/Set the ending position for the Y axis (in mm), used when generating stage poses on the circular grid.
Number of Steps on X axis | Double | Get/Set the number of samples when rotating the stage along the Y axis of the circular grid. This property has a minimum value of 1. Throws System.ArgumentOutOfRangeException: If the setter value is less than one.
Cancel Requested | Boolean | Gets/sets if a cancel was requested. If this property is set to true before or during execution, the looping is cancelled.

These ranges and steps can also be set via Calibration Loop UI UI control.

## Accumulate Features Script

This block supplies the script point "AccumulateFeatures". During execution this script point will be called for each pose in the generated set of stage poses. The script point will be called with suitable arguments to implement a single-pose feature extractor system.

bool AccumulateFeatures (Int32 Index, Double X, Double Y, Double Theta)

Name | Type | Description
--- | --- | ---
Index | int | The zero-based iteration count in the current calibration operation. The first call to this script point receives a zero, the second call a one, etc.
X | Double | The X value of stage position that was used to acquire the images in this iteration
Y | Double | The Y value of stage position that was used to acquire the images in this iteration
Theta | Double | The Theta value of stage position that was used to acquire the images in this iteration

In case user wants to cancel the Loop in the middle, “CancelRequested” property need to be set as true via scripting, such as: