Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I've implemented 'ImageChops' to find the difference between 2 images. The differences are pointed out in the output accurately, but the picture lacks clarity. Sometimes the contents of the output overlap.

Is it possible to point out the difference in the images such that the whole image is displayed & the differences are highlighted, like how 'matchTemplate()' displays the complete image & allows us to use a bounding box to highlight the matched areas?

What I have tried:

from PIL import Image, ImageChops

img1= Image.open("C:/ImageComparison/Images/img1.png")
img2=Image.open("C:/ImageComparison/Images/img2.png")

diff=ImageChops.difference(img1, img2).convert('RGB')

diff.show()
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900