The Image Difference Comparator is a Python script that compares two input images and highlights the differences between them. It utilizes the Structural Similarity Index (SSIM) to measure the similarity between the images and produces an output that shows the regions where the images differ.
- Comparison of two input images to detect differences.
- Calculation of the Structural Similarity Index (SSIM) between the images.
- Highlighting of differing regions using bounding boxes.
- Display of original images, difference image, and thresholded difference image.
- Ensure you have Python and OpenCV installed on your system.
- Place the two images (
0.jpg
and1.jpg
) you want to compare in the same directory as the script. - Run the script using the command:
python image_difference_comparator.py
- The script will load the two input images, calculate the SSIM, and generate visual outputs.
- The "Original" window will display the first input image.
- The "Modified" window will display the second input image.
- The "Diff" window will display the different images, highlighting differing regions.
- The "Thresh" window will display the thresholded difference image.
This script requires the OpenCV library and Python installed on your system.
Fig. 1: The Image Difference Comparator in action, showing original images, difference images, and thresholded difference images.
For any inquiries or feedback regarding the Image Difference Comparator script, please feel free to contact the developer: Name: Morteza Hatami Email: [email protected]