是否有适用于.NET的OK图像识别库?
-
02-07-2019 - |
题
我希望能够将从网络摄像头拍摄的图像与存储在计算机上的图像进行比较。
图书馆不需要百分之百准确,因为它不会用于任何关键任务(例如警方调查),我只想要一些可以使用的东西。
我已经尝试了 CodeProject的图像识别的演示项目,它当我比较完全相同的图像120x90像素时,只适用于小图像/根本不起作用(这不属于OK: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
}
其他提示
您可以使用 EmguCV for .NET。
我做得很简单。只需下载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");
}
不隶属于 StackOverflow