Overview
This project aims to align images taken from different channels (e.g., blue, green, red) to create a composite RGB image. The alignment process corrects for any misalignment between the channels caused by various factors such as camera movement or lens distortion.
Approach
My approach involves using a combination of image processing techniques, including pyramid image alignment and cross-correlation, to find the optimal alignment parameters for each channel. Here's a brief overview of our approach:
- Reading and Preprocessing: Read images and convert them to floating-point format.
- Shrinking: If images are large, shrink them to improve processing speed.
- Cropping: Crop each channel to remove any unwanted borders.
- Alignment: Use pyramid image alignment to align each channel with the reference channel (usually green).
- Offset Calculation: Calculate the offset values (shifts) for each channel.
- Composite Image: Combine the aligned channels to create the final RGB image.
- Save Results: Save the aligned image and offset values to files for further analysis.
Challenges
During the project, I encountered several challenges, such as:
- Large Image Sizes: Processing large images efficiently required implementing techniques like image shrinking.
- Alignment Accuracy: Achieving precise alignment was challenging, especially with images containing complex features.
- Edge Cases: Handling edge cases where images have minimal features or are heavily distorted required careful consideration.
Results
Channels
Aligned Image
Blue shift: -27, -10
Red shift: 33, 3
Channels
Aligned Image
Blue shift: -20, -6
Red shift: 22, -1
Channels
Aligned Image
Blue shift: -13, -6
RRed shift: 16, 2
Channels
Aligned Image
Blue shift: -17, -3
Red shift: 21, 1
Channels
Aligned Image
Blue shift: -17, -5
Red shift: 20, -1
Channels
Aligned Image
Blue shift: -14, -2
Red shift: 14, 9
Channels
Aligned Image
Blue shift: -18, -7
Red shift: 19, 2
Channels
Aligned Image
Blue shift: -21, -4
Red shift: 24, 3
Channels
Aligned Image
Blue shift: -15, -8
Red shift: 18, 6
Example Images
Channels
Aligned Image
Blue shift: -8, -4
Red shift: 12, 2
Channels
Aligned Image
Blue shift: -14, -1
Red shift: 14, -1