I want to compare two web pages images using computer vision techniques. show what are non-unique portions comparing both images. which part image1 not exist in image2 vice versa.
A simple and time efficent solution is the computation of the absoulte values of the difference image. This can be done as follows:
import cv2 img_a = cv2.imload([first_image_filename]) img_b = cv2.imload([second_image_filename]) img_diff = cv2.absdiff(img_a, img_b) cv2.imshow('abs difference', img_diff) cv2.waitKey(-1)