views:

4437

answers:

4

I want to be able to compare an image taken from a webcam to an image stored on my computer.

The library doesn't need to be one hundred percent accurate as it won't be used in anything mission critical (e.g. Police investigation), I just want something 'ok' I can work with.

I have tried a demonstration project for Image Recognition from CodeProject, and it only works with small images / doesn't work at all when I compare an exact same image 120x90 pixels (this is not classified as 'ok' :P ).

Has anybody here had success with image recognition before?

If so, would you be able to provide a link to a library I could use in either C# or VB.NET?

Thanks in advance. :)

+12  A: 

You could try this: http://code.google.com/p/aforge/

It includes a comparision analysis that will give you a score. There are many other great imaging features of all types included as well.

The class also can be used to get similarity level between two image of the same size, which can be useful to get information about how different/similar are images: 
// create template matching algorithm's instance
// use zero similarity to make sure algorithm will provide anything
ExhaustiveTemplateMatching tm = new ExhaustiveTemplateMatching( 0 );
// compare two images
TemplateMatch[] matchings = tm.ProcessImage( image1, image2 );
// check similarity level
if ( matchings[0].Similarity > 0.95 )
{
    // do something with quite similar images
}
mattlant
Sounds great! Lets hope it works as expected... I'll mark your answer as accepted if it does. :)
RodgerB
It works absolutely fantastic! 100% similar for comparing its own image, 91% similar for me sitting upright on my chair and me leaning to my left. This is everything I could have hoped for, thanks a billion :)
RodgerB
Thats awesome, i am glad i could link you to it. I wish somehow there was a way to payback the guy who linked to me first. It was exactly what i needed in one of my projects as well. Thanks
mattlant
You can always trust Stackoverflow for your hard questions! Done a lot of googling without finding any good libs. Thanks
StefanE
A: 

this doesnt work for me, im comparing playing cards and it thinks the Ace of Spades is 95% identical to the King of Hearts

A: 

Can someone give an example?

Tried it, but don´t know realy how i can use it

Scaer
A: 

you can exactly use EmguCV for .Net.

snndynya