Dual-Camera Coregistration

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:

  1. the rig the Save Folder is bound to, read from its folder rig ledger;
  2. otherwise, a rig passed by the program that opened the tool;
  3. 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.

Choose the rig to calibrate dialog with Rig A (RigA) - Active pre-selected
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:

CauseWhat 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.

No rig available alert: the folder is bound to rig Rig B, which is archived
The folder's rig is archived.

No rig available alert: the folder is bound to rig Rig C, which is not in this rig library
The folder's rig is not in this computer's library.

No rig available alert: no rig was selected
No rig was chosen in the dialog.

Current dual-camera coregistration interface showing the Recalibrate action
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

  1. 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.

    High-contrast grid visible in both camera acquisition windows
    Example high-contrast calibration target recorded simultaneously by both cameras.

  2. 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.
  3. 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.
  4. Estimate the transform. Use Use enhanced contrast and Flip Horizontally when needed to make corresponding structures comparable, then click Run Automatic coregistration.
  5. 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.

    Examples of good and poor dual-camera alignment in false-color overlay
    Good alignment has overlapping structures; colored duplicate edges reveal a poor alignment.

  6. 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.
  7. 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.
ControlPurpose
Start Initial Calibration / RecalibrateSelects 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 OverlayCompares cameras without changing data.
Use enhanced contrast / Flip HorizontallyPrepares the alignment view.
Run Automatic coregistrationEstimates a candidate transform.
Transformation / Step size / Apply StepFine-tunes translation, rotation, or scale.
Save CoregistrationAfter 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 FilesReviews 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.

Coregistration file manager with active and archived calibration files
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.


Back to top

Copyright © LabeoTech 2026. This work is licensed under the GNU General Public License, Version 3.0.