This project is Project 1 of the CS180 course. The project involves cropping, aligning, and displaying three RGB images using the following methods:
The results show that the images are well-aligned with minimal ghosting and proper border cropping, achieving the task objectives. Although the .tif images are much larger than the .jpg images, the pyramid algorithm significantly reduced the runtime and expanded the search range.
A drawback is that ghosting is not completely eliminated; some ghosting is still visible under magnification (eg. emir, melons), indicating that the best match has not been obtained. This may be due to the NCC distance calculation method, as using `np.roll` for NCC calculation affects the result by including surrounding pixels. Additionally, NCC itself may have limitations, as it might struggle with images containing objects with contrasting colors against backgrounds. Consideration of alternative image distance matching algorithms may be needed.
You can view or download the Python code by clicking the links below:
Download main.py Download colorize_all.py Download image_py_Gaussian.py Download search.py Download utils.pyBelow are the images generated by the Python code: