0

I have an image pair.enter image description here enter image description here

What I require is to report changes b/w them(which I'm able to do).

The program also shows changes where there is the big black patch in Image1. While it is definitely a change, I require such changes(where there is no information(black patch) in one of the images) to be ignored.

For eg, in the given pair, only the hexagon should be shown as a change. Thus, I need to locate the coordinates of either the patch or image sans the patch. I came across an approach in this answer.

How can I achieve this in Matlab? The approach works great, but I am having trouble finding the functions corresponding to the cv2 functions in Matlab (particularly cv2.approxpolyDP() and cv2.arclength().Tried using regionprops but to no avail.

Is there any other way too, other than the one in the linked approach

PS:I am new to Matlab.

Community
  • 1
  • 1
Nancy
  • 315
  • 1
  • 5
  • 16
  • You have posted a link to the reference manual. I think it pretty much explains how you can extract the x and y values for each contour of the `ContourMatrix`, so you'd simply have to sum up the distances between each of the (x, y) pairs. BTW: Are you sure that the longest contour will do in your case? Have you plotted the contours that are found over your image? – Matthias W. Feb 03 '16 at 07:00
  • Actually what I intend to do is entirely different. I need to report any changes b/w a pair of similar images(read satellite images), with minor differences. I am able to perform that, but in some image pairs,one (only one) of the image has such black patches on the corners. Since that is also a change(for my algorithm), it gets reported, but I don't want such changes to be reported. Thus I'm seeking to isolate that black patch before performing change detection, so that the previously non-black image now gets black in the very same patch(thus algorithm concludes no change in that patch) – Nancy Feb 03 '16 at 07:26
  • Wasn't paying attention while reading the manual. Got it now. – Nancy Feb 03 '16 at 09:49

0 Answers0