MIRA - Multiband Imaging Registration Assistant
Authors/Creators
Description
MIRA is a desktop application designed for the automatic geometric registration of multiband and multispectral photographic datasets. Developed specifically for Cultural Heritage diagnostic imaging, conservation laboratories, and technical photography, MIRA eliminates the traditional manual alignment bottleneck in multiband imaging pipelines.
Technical Overview & Core Algorithm
Unlike conventional commercial photo-stitching or photogrammetry software that relies on Feature-Based tracking algorithms (such as SIFT, ORB, or AKAZE), MIRA implements an Intensity-Based (Mutual Information) registration approach.
Feature-based methods search for discrete geometric keypoints (sharp edges, cracks, corners) and routinely fail when processing cross-modality datasets due to drastic radiometric variations between bands. Radical changes in contrast, color inversion, or exposure (e.g., comparing Ultraviolet Fluorescence with a Infrared Reflectography) mislead geometric descriptors, resulting in registration errors or local distortions.
The Mutual Information Algorithm
MIRA resolves this limitation by utilizing the Mattes Mutual Information criterion powered by SimpleITK.
- Statistical Matching: Instead of tracking local features, the software analyzes the overall joint probability distribution and pixel entropy between image modalities.
- Iterative Optimization: A multi-resolution linear pyramid framework combined with a Regular Step Gradient Descent optimizer iteratively translates, rotates, and scales the target image as a rigid block until the shared statistical information content with the master reference is maximized.
Core Features & GUI Parameters
MIRA features a streamlined, single-task user interface built with CustomTkinter. The workflow is optimized around four primary parameters:
- Master Reference Suffix: Allows the operator to specify the filename of the reference image (default:
_VIS). This image remains completely untouched, while all other bands are registered against it. - Max Iterations: Defines the optimization step threshold. The optimal range is 400 to 800 steps; higher values offer sub-pixel accuracy for severely shifted images, while lower values speed up execution but may prevent full convergence.
- Focus ROI Area (Region of Interest): Restricts the calculation to a percentage-based central window of the canvas (e.g., 60%). This instructs the engine to avoid some background details, making it especially useful when photographing an object placed on a rotating platform, while significantly reducing processing times.
- Auto-Enhance (CLAHE): Applies a Contrast Limited Adaptive Histogram Equalization as a pre-processing step. By enhancing local contrast in small tiles across the image rather than globally, it amplifies subtle textures and hidden details within flat, dark UV or faint IR channels, vastly increasing registration success rates. Based on our operational experience, we generally suggest keeping this option enabled.
Dataset & File Requirements
To prevent execution errors, the input directory must comply with the following structural conventions:
- Ordered Group Distribution: Files are processed in sequential blocks. For instance, if Bands per group is set to
4, the engine automatically clusters files in groups of four based strictly on alphanumeric sorting. - The Master Reference Anchor: Within each processed group, at least one file must explicitly contain the designated suffix used to identify the anchor image (e.g.,
filename_VIS). This file serves as the reference for that specific subset. - Coherent Dimensions: All images within the same group must share identical pixel width and height dimensions prior to running the engine.
- Supported Formats: Fully supports
.tif,.tiff,.jpg, and.jpeg(handling both standard 8-bit and 16-bit files).
How to Run MIRA
MIRA is distributed in three independent versions:
- Windows standalone executable (
MIRA_Win.zip) - macOS standalone application (
MIRA_macOS.zip) - Python source code (
MIRA.py)
The standalone versions require no Python installation or command-line interaction. The Python version is provided for users who wish to inspect, modify, or extend the source code.
Windows
- Download MIRA_Windows.zip from Zenodo and extract its contents.
- Open the extracted folder.
- Double-click MIRA.exe to launch the program.
- Important: keep
MIRA.exeinside the extracted folder together with all the accompanying files and directories (e.g., the_internalfolder). Moving only the executable will prevent the software from starting correctly.
macOS
- Download MIRA_macOS.zip from Zenodo and extract its contents.
- Open the extracted folder.
- Double-click MIRA.app to launch the program.
- Important: keep
MIRA.appinside the extracted folder together with all the accompanying files. The application relies on the bundled resources and should not be moved independently. - If macOS displays a security warning because the application is unsigned, right-click MIRA.app, choose Open, and confirm the prompt. This operation is required only the first time the application is launched.
Python Source Code
- Download MIRA.py from Zenodo.
- Ensure that Python and all required dependencies listed in the documentation are installed.
- Open a terminal in the directory containing
MIRA.py. - Launch the program with:
python MIRA.py
Running MIRA
After launching any version, the graphical user interface will open. Select your source folder, adjust the processing parameters according to your dataset, and click RUN REGISTRATION to start the workflow.
License
This project is licensed under the MIT License – see the accompanying LICENSE.txt file for full details.
Acknowledgments & Credits
MIRA is an open-source project born from practical laboratory needs. The author explicitly acknowledges the following foundational pillars:
- The Python Scientific Community: Built entirely using the Python Programming Language ecosystem and its outstanding open-source libraries:
SimpleITK,OpenCV(opencv-python),NumPy, andCustomTkinter. - Gemini (Google AI): Co-designed and developed in close collaboration with Gemini. The generative AI acted as an adaptive technical collaborator, co-authoring the structural source code, optimizing the mathematical registration routines, resolving compilation bugs, and refining the interface layout across multiple iterations.
Files
MIRA-Win.zip
Additional details
Software
- Programming language
- Python