59

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

该库不需要百分百准确,因为它不会用于任何关键任务(例如警察调查),我只想要可以使用的东西。

我已经尝试了CodeProject的图像识别演示项目,它仅适用于小图像/当我比较完全相同的 120x90 像素图像时根本不起作用(这未被归类为 OK :P)。

图像识别之前有没有成功过?

如果是这样,您能否提供指向我可以在 C# 或 VB.NET 中使用的库的链接?

4

3 回答 3

78

你可以试试这个: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
}
于 2008-09-30T07:16:33.983 回答
10

您可以完全将EmguCV用于 .NET。

于 2010-10-26T15:58:37.617 回答
4

我做的很简单。只需在此处下载 EyeOpen 库。然后在您的 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");
}
于 2012-09-14T09:32:17.160 回答