title: Compare images to find differences
body: <p>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).</p>
  
  <p>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 :)</p>
  
  <p>Tools: C# or VB.NET, Emgu.CV (.NET wrapper for OpenCV) or something similar</p>