【问题标题】:Are there any OK image recognition libraries for .NET?.NET 有什么好的图像识别库吗?
【发布时间】:2010-09-14 04:49:11
【问题描述】:

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

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

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

之前有没有在图像识别方面取得成功?

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

【问题讨论】:

  • 它肯定适用于比这更大的图像,可能是格式的其他问题。

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


【解决方案1】:

你可以试试这个: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
}

【讨论】:

  • 效果非常棒! 100% 相似用于比较它自己的图像,91% 相似于我直立坐在我的椅子上和我靠在我的左边。这就是我所希望的一切,感谢十亿 :)
  • 那太棒了,我很高兴能把你链接到它。我希望有一种方法可以偿还首先与我联系的人。这正是我在我的一个项目中所需要的。谢谢
  • 您始终可以信任 Stackoverflow 来解决您的难题!做了很多谷歌搜索,但没有找到任何好的库。谢谢
  • 好吧,我一直有使用图像识别来实现我假设的应用程序的想法。现在我可以弄脏手了!谢谢马特兰特! ;)
  • 我找了很久,这个答案很完美
【解决方案2】:

对于 .NET,您完全可以使用 EmguCV

【讨论】:

    【解决方案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");
    }
    

    【讨论】:

    • 简单好用的图片对比,我喜欢。
    • @j0k,我猜是因为答案适用于 2 个问题,正如赞成票所证明的那样......
    猜你喜欢
    • 2023-03-22
    • 2010-10-16
    • 2017-08-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-09-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多