15,667,355 members
See more:
Hi,

Basically what I am trying to do is check the difference between two images.
Now I have done it 4 ways already (and they give me a pretty good estimated value) I am struggling to do it another fifth way. (it is just a fun project, I am trying to "learn" it atm)

So here is what I have:
http://img809.imageshack.us/img809/5138/edgecomp.png[^]

These are 2 different pictures of the same cellphone.

Now what I would like to do is to compare these two "shapes"/"polygons" or the whole images if they match. Now I could just compare it pixel by pixel but soon you will realize why that's not a way to go, because if I take the photo of the same phone but from another height (and/or angle) the phone's edges will draw a slightly different polygon. I tried comparing the number of points of each polygon but without any success.

Any ideas?
Posted
Updated 2-May-13 7:06am
v3

## Solution 1

If you have a continuos line you could replace it by using an A* search algorithm, That way you would find any hole lines:
WPF: A* search[^]

Then you could simplify the line by using Douglas-Peucker or simular algorithm:
Polyline Simplification[^]

Now it would just be a metter of finding simular shapes.

PS: Assuming the pictures are Soble or Canny edge detection?

velvet7 2-May-13 13:12pm