Dual-Camera Coregistration
This tool is dedicated to performing the coregistration of images from Dual-Camera Imaging systems from LabeoTech. Its goal is to ensure that the outputs of both cameras are aligned.
Open from DataViewer
Choose Utilities > OiS 2-Cam Alignment. The active Save Folder must have AcqInfos.MultiCam=true. DataViewer passes the folder; the tool then chooses the rig it works on (see below).
Which rig the calibration is saved into
A calibration is saved into a rig of the rig library. When it opens, the tool chooses that rig in this order:
- the rig the Save Folder is bound to, read from its folder rig ledger;
- otherwise, a rig passed by the program that opened the tool;
- otherwise, you choose the rig in the dialog Choose the rig to calibrate, where the Active rig is pre-selected.
The tool never falls back silently to the Active rig.

For a folder that is not bound to a rig, you choose the rig; the Active rig is pre-selected.
Without a usable rig, the tool shows a No rig available alert that says why, and closes when you press OK:
| Cause | What to do |
|---|---|
| The folder is bound to a rig that is archived. | Restore the rig in the Rig Manager, then reopen the tool. |
| The folder is bound to a rig that is not in the rig library of this computer. | Import the rig from a .umitrig file exported on the computer that has it (see Moving a rig to another computer), then reopen the tool. |
| No rig was selected in the dialog. | Reopen the tool and choose a rig. |

The folder's rig is archived.

The folder's rig is not in this computer's library.

No rig was chosen in the dialog.

The current tool with an active rig calibration; the source action is exposed as Recalibrate.
Normally a one-time hardware calibration
Repeat the calibration when a camera is moved, the optical path changes, or image alignment no longer passes visual quality control. Once a calibration is active, a dual-camera data-import function such as ImagesClassification automatically applies it to camera-2 data during import.
Calibration source
Choose Start Initial Calibration and select only the raw acquisition folder. The tool reads the acquisition through ReadInfoFile, requires MultiCam=true, and classifies the recording with default settings in a temporary Save Folder. The temporary data are removed when calibration finishes, is cancelled, or fails; source recordings and existing Save Folders are never used as calibration output.
When a calibration is already active, the same control becomes Recalibrate. After confirmation, the current calibration is preserved and temporarily deactivated so the same raw-data preparation path produces unregistered camera images. A successful save activates the new resource and keeps the previous resource in history. Cancelling, closing the tool, or encountering an error restores the previous active calibration automatically.
Step-by-step procedure
- Record a calibration target. Acquire a short dual-camera recording of a stable, high-contrast pattern that is clearly visible on both cameras. A grid is particularly useful because translations, rotations, and scale differences are easy to recognize.

Example high-contrast calibration target recorded simultaneously by both cameras. - Open the tool. In DataViewer, open a dual-camera session and choose Utilities > OiS 2-Cam Alignment. Confirm that the selected rig is the rig whose physical camera arrangement you are calibrating.
- Prepare the source images. Click Start Initial Calibration, or Recalibrate when a calibration is already active. For recalibration, read and accept the confirmation describing rollback protection. Select the raw acquisition folder from step 1; do not select or create a Save Folder. The tool validates MultiCam=true and prepares temporary, unregistered camera images automatically.
- Estimate the transform. Use Use enhanced contrast and Flip Horizontally when needed to make corresponding structures comparable, then click Run Automatic coregistration.
- Inspect and refine the alignment. Compare the cameras with Alternate View, then use False Color Overlay to expose residual offsets. In a good result, corresponding edges overlap and appear neutral; separated green and magenta edges indicate misregistration. Adjust Transformation, Step size, and Apply Step until the important structures overlap.

Good alignment has overlapping structures; colored duplicate edges reveal a poor alignment. - Save and activate. Click Save Coregistration and confirm. The new calibration becomes the active rig resource only after it is saved successfully. During recalibration, the previous calibration remains available in history.
- Verify the managed file. Open Manage Coregistration Files and confirm that the intended calibration is marked ACTIVE. Use Review for another visual check without changing resource state.
| Control | Purpose |
|---|---|
| Start Initial Calibration / Recalibrate | Selects a raw dual-camera acquisition, validates it, and prepares temporary unregistered camera images. Recalibration is offered only when an active calibration exists. |
| Alternate View / False Color Overlay | Compares cameras without changing data. |
| Use enhanced contrast / Flip Horizontally | Prepares the alignment view. |
| Run Automatic coregistration | Estimates a candidate transform. |
| Transformation / Step size / Apply Step | Fine-tunes translation, rotation, or scale. |
| Save Coregistration | After confirmation, stores the transform as a managed resource of the rig chosen when the tool opened (see Which rig) and makes it the active calibration. |
| Manage Coregistration Files | Reviews and manages the current rig's active, available, and archived calibration files. |
Manage coregistration files
Manage Coregistration Files opens a compact file manager. Select one calibration to see its status, creation time, UUID, and description. The list is ordered newest first. File management is unavailable while initial calibration or recalibration is in progress.

Actions are enabled according to the selected file's lifecycle status.
- Review loads any selected calibration into the preview without changing its status.
- Make Active activates an available calibration and returns the previously active calibration to available status.
- Archive moves an available calibration into archive storage. To archive the active calibration, first make a different calibration active.
- Restore returns an archived calibration to available status without activating it.
- Purge permanently deletes an archived calibration after explicit confirmation.
Files and application of the transform
Save Coregistration does not rewrite the raw calibration acquisition, and it never changes a data folder. It saves the transform and preview information as a managed resource for the selected rig. The workflow-owned temporary classified folder is deleted after the resource is successfully saved and activated.
Folders imported earlier keep their transform
A new calibration is applied only by later dual-camera imports that use this rig as the Active rig. Folders imported before keep the transform they were imported with (it is committed in their rig ledger). To apply a corrected calibration to such a folder, Recalibrate here, then re-import the raw data (a fresh import). There is no import option to skip the active calibration.
When that calibration is applied during a dual-camera import:
- camera-2 channel .dat files are warped in place with nearest-neighbour interpolation;
- camera-1 .dat files are not changed;
- AcqInfos.mat supplies channel, camera, size, binning, flip, and rotation information of the acquisition but is not itself geometrically transformed (it holds no rig information);
- a local tformDualCam.mat copy records the adjusted transform used for that processed folder;
- the folder is bound to the rig, and the coregistration is committed in its rig ledger.
Where the calibration is stored
The full calibration belongs to the rig's managed coregistration history. Its record includes tform, tformInfo, raw-source and creation information, and stored preview images. Use Manage Coregistration Files for lifecycle operations; do not move or delete managed files manually.
Quality control
Use Alternate View and False Color Overlay to compare vessels and field-of-view borders from both cameras before saving. The local QC summary records translation in pixels, rotation in degrees, X/Y scale, and the transform determinant. These values help identify unexpectedly large or reflected transforms but do not replace visual inspection.
DataViewer refresh
DataViewer waits for the utility to close and then reports closure. The currently displayed data is not automatically rewritten by this utility.
Rig-level resource
Camera coregistration belongs to the rig, not one subject. Verify the physical camera arrangement before making a transform active.