Question

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 there been any 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?

Was it helpful?

Solution

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

It includes a comparison 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
}

OTHER TIPS

You can exactly use EmguCV for .NET.

I did it simply. Just download the EyeOpen library here. Then use it in your C# class and write this:

 use eyeopen.imaging.processing

Write

ComparableImage cc;

ComparableImage pc;

int sim;

void compare(object sender, EventArgs e){

    pc = new ComparableImage(new FileInfo(files));

    cc = new ComparableImage(new FileInfo(file));

    pc.CalculateSimilarity(cc);

    sim = pc.CalculateSimilarity(cc);

    int sim2 = sim*100

    Messagebox.show(sim2 + "% similar");
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top