Click here to Skip to main content
15,667,355 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

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:[^]

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?
Updated 2-May-13 7:06am

1 solution

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?
Share this answer
velvet7 2-May-13 13:12pm    
Thanks for your answer!

Canny edge detection.

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