我想比较从网络摄像头拍摄的图像和存储在电脑上的图像。
这个库不需要百分之百准确,因为它不会用于任何关键任务(例如警方调查),我只需要可用的东西。
我尝试了一个来自CodeProject的图像识别演示项目,但它只能处理小的图片/当我比较一个大小为120×90像素的完全相同的图像时根本无法工作(这不被认为是可行的:P)。
之前有过图像识别的成功案例吗?
如果有的话,您能否提供一个在C#或VB.NET中使用的库的链接呢?
我想比较从网络摄像头拍摄的图像和存储在电脑上的图像。
这个库不需要百分之百准确,因为它不会用于任何关键任务(例如警方调查),我只需要可用的东西。
我尝试了一个来自CodeProject的图像识别演示项目,但它只能处理小的图片/当我比较一个大小为120×90像素的完全相同的图像时根本无法工作(这不被认为是可行的:P)。
之前有过图像识别的成功案例吗?
如果有的话,您能否提供一个在C#或VB.NET中使用的库的链接呢?
你可以尝试这个: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
}
我很简单地完成了它。只需在此下载 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");
}