简体   繁体   English

是否有适用于.NET的OK图像识别库?

[英]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 (eg 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 ). 我已经尝试过CodeProject的图像识别演示项目,它只适用于小图像/当我比较完全相同的图像120x90像素时根本不起作用(这不属于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? 如果是这样,你能提供一个我可以在C#或VB.NET中使用的库的链接吗?

You could try this: http://code.google.com/p/aforge/ 您可以尝试这样做: 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
}

您可以使用EmguCV for .NET。

I did it simply. 我干脆做了。 Just download the EyeOpen library here . 只需在下载EyeOpen库。 Then use it in your C# class and write this: 然后在你的C#类中使用它并写下:

 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");
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM