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

时间:2008-09-30 07:02:50

标签: c# .net vb.net image image-recognition

我希望能够将从网络摄像头拍摄的图像与存储在计算机上的图像进行比较。

图书馆不需要百分之百准确,因为它不会用于任何关键任务(例如警方调查),我只想要一些可以使用的东西。

我已经尝试了Image Recognition from CodeProject的演示项目,它只适用于小图像/当我比较完全相同的图像120x90像素时根本不起作用(这不属于OK:P)。

以前图像识别是否有成功?

如果是这样,你能提供一个我可以在C#或VB.NET中使用的库的链接吗?

3 个答案:

答案 0 :(得分:71)

你可以试试这个:http://code.google.com/p/aforge/

它包含一个比较分析,可以给你一个分数。还包括所有类型的许多其他伟大的成像功能。

// 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
}

答案 1 :(得分:8)

您可以完全使用EmguCV for .NET。

答案 2 :(得分:3)

我做得很简单。只需下载EyeOpen库here即可。 然后在C#类中使用它并写下:

 use eyeopen.imaging.processing

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