0
$\begingroup$

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.

Web page image 1

Webpage Image 2

$\endgroup$
0
$\begingroup$

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)
| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you I can see the difference. Is it possible to ignore the same alphabets with different font sizes(Can we show as no difference)? $\endgroup$ – prashanth Apr 29 at 19:19
  • $\begingroup$ With such a low level analysis not. To ignore alphabets you would have to apply an optical character recognition (OCR) and than set regions with detected characters to 0. $\endgroup$ – Tobias Senst May 1 at 8:48
  • $\begingroup$ Thank you, I will try to apply OCR and is there any similar kind of work or any blog. $\endgroup$ – prashanth May 1 at 14:19
  • $\begingroup$ I have got no specific blog in mind. Maybe learnopencv.com/tag/ocr $\endgroup$ – Tobias Senst May 1 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.