# Space Tree in AlignPlus

In AlignPlus, there are mainly two spaces to consider in space tree:

1. Checkerboard Calibration Space (corresponding to Plate2D)
2. Home2D Space

Checkerboard calibration space is a by-product of checkerboard calibration, it's built on corrected image and originated at Plate2D.

Home2D space is generated through hand-eye calibration or manual calibration which maps Root2D (equal to Raw2D) to Home2D so that every feature located in the image can output Home2D coordinates.

## Space Tree generated by Hand-eye Calibration or Manual Calibration

- Checkerboard-based hand-eye calibration or hybrid manual calibration

  Both checkerboard-based hand-eye calibration and hybrid manual calibration use checkerboard to correct lens distortion and camera perspective distortion. So the space tree for each camera will have both checkerboard calibration space and Home2D:

  Note: Once root space to checkerboard calibration space, and checkerboard calibration space to Home2D space transforms are established, Home2D to root space transform is also established. User can directly use image's GetTransform method to get transform between any two spaces in space tree. (To get Home2D from root space transform, call GetTransform("Home2D", "@")).

- Part-based Hand-eye Calibration or Non-hybrid Manual Calibration directly build Home2D upon root space.

## Spaces generated by Cross Calibration

Cross calibration itself doesn't create new Home2D, but maps Home2D from one set of cameras to another set of cameras as they all share the same Home2D.

- Checkerboard-based Cross Calibration

  For checkerboard-based cross calibration, the same calibration plate was used for Camera1 and Camera2, since Camera1's Home2D and checkerboard calibration space transform is already known, Camera2 then can copy this transform and attached it to Camera 2. After calibration, both cameras have their own root space to checkerboard calibration space transforms but share the same checkerboard calibration space to Home2D transform.

- Part-based Cross Calibration

  In part based cross calibration, one run time part or dummy part was transferred from Camera1 to Camera2. The features on part under Camera1 already have Home2D coordinates. When they're moved to under Camera2, they'll have new Root2D coordinates. However, their Home2D coordinates doesn't change, therefore, Home2D from Camera2's Root2D transform can be calculated by mapping the two coordinate pairs. After calibration, both cameras have their own Root2D to Home2D transforms. Whereas, the Home2D coordinate here are the same.