This repository contains Python scripts for performing image registration using OpenCV. The toolkit includes methods for both homography-based and affine transformation-based registration, supporting both rigid and non-rigid transformations. These scripts are designed to handle images in TIFF format, commonly used in scientific imaging.
- Normalization: Custom normalization for 16-bit images to enhance feature detection.
- Robust Feature Matching: Uses AKAZE keypoints for reliable matching.
- Homography Registration: Applies transformations based on homography matrix computation.
- Rigid Registration: Utilizes affine transformations for registration.
- Preservation of Metadata: Original images are used for the final transformation to preserve metadata.
Before you start, ensure you have the following installed:
- Python 3.6 or higher
- OpenCV
- NumPy
- PIL
You can install the necessary Python packages using pip:
pip install numpy opencv-python pillow
The repository contains two main scripts:
- global_Merged.py: Script for registering images based on homography.
- rigid_registration.py: Script for registering images using affine transformations.
To use these scripts, follow these steps:
- Clone the repository:
[git clone https://github.com/your-username/image-registration-toolkit.git](https://github.com/NabaviLab/Sequential_Registration.git)
- Place your TIFF images in an input directory.
- Run the desired registration script. For example, to perform homography-based registration, use:
python global_Merged.py --input ./input --output ./output
To perform rigid registration, use:
python affine_Merged.py --input ./input --output ./output
- --input: Directory containing the input TIFF images.
- --output: Directory where the registered images will be saved.