# Calibration Sub Tasks

## Calibration Subtask

Calibration subtask performs calibration related functions.

The inputs are acquisition settings of current task, current command and image collection, as well as accumulated commands and images collections at all already acquired positions.

Input | Type | Description
--- | --- | ---
AccumlatedCommands | List<CommandArgs> | Accumulated commands that have been sent to Acquisition subtask to acquire a whole set of images at all acquisition positions.
AccumulatedImageCollection | List<CogImageCollection> | Accumulated images acquired at different acquisition positions.
AcquisitionSettings | AcquisitionSettings | The acquisition settings for current task, which includes camera indexes, camera enable/disable status, exposure time and position indexes.
Command | CommandArgs | Current command of the task, it's the same with the input Command.
ImageCollection | CogImageCollection | A collection of images acquired at current position index.

The output is a dictionary of VisionPro Records that could be used to shown on image display.

Output | Type | Description
--- | --- | ---
VisionProRecords | IReadOnlyDictionary<String, vprorecord> | A dictionary of images and their graphics from current task

This subtask publishes the results of calibration that other tasks consume.

## Calib2DFromStage2D Subtask

This subtask computes the Home2DFromRaw2D transform for the current station.

The inputs are acquisition settings of current task, accumulated commands, and images collections at all already acquired positions.

Input | Type | Description
--- | --- | ---
AccumlatedCommands | List<CommandArgs> | Accumulated commands that have been sent to Acquisition subtask to acquire a whole set of images at all acquisition positions.
AccumulatedImageCollection | List<CogImageCollection> | Accumulated images acquired at different acquisition positions.
AcquisitionSettings | AcquisitionSettings | The acquisition settings for current task, which includes camera indexes, camera enable/disable status, exposure time and position indexes.

## Calibration Loop Subtask

Calibration Loop subtask does not have any input or output pins. In applications where the vision system guides the motion device, it works with the hand-eye calibration task to move the motion device to various poses, gather calibration target data and compute calibration results.