Compare images to find differences
Posted
by _simon_
on Stack Overflow
See other posts from Stack Overflow
or by _simon_
Published on 2010-03-31T13:50:19Z
Indexed on
2010/03/31
13:53 UTC
Read the original article
Hit count: 167
Task: I have a camera mounted on the end of our assembly line, which captures images of produced items. Let's for example say, that we produce tickets (with some text and pictures on them). So every produced ticket is photographed and saved to disk as image. Now I would like to check these saved images for anomalies (i.e. compare them to an image (a template), which is OK). So if there is a problem with a ticket on our assembly line (missing picture, a stain,...), my application should find it (because its image differs too much from my template).
Question: What is the easiest way to compare pictures and find differences between them? Do I need to write my own methods, or can I use existing ones? It would be great if I just set a tolerance value (i.e. images can differ for 1%), put both images in a function and get a return value of true or false :)
Tools: C# or VB.NET, Emgu.CV (.NET wrapper for OpenCV) or something similar
© Stack Overflow or respective owner