Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any OK image recognition libraries for .NET?

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?

like image 684
RodgerB Avatar asked Sep 30 '08 07:09

RodgerB


3 Answers

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
}
like image 96
mattlant Avatar answered Nov 17 '22 11:11

mattlant


You can exactly use EmguCV for .NET.

like image 44
snndynya Avatar answered Nov 17 '22 13:11

snndynya


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");
}
like image 4
Hydarnes Avatar answered Nov 17 '22 13:11

Hydarnes