AForge 和 OpenCV 之间的差异
我刚刚学习计算机视觉和 C#。 似乎两个著名的图像处理库是 OpenCV 和 AForge。 两者有哪些区别?
我正在用 C# 制作一个基本的图像编辑器,在研究过程中我遇到了关于这两个方面的文章。 但我真的不知道为什么我会选择其中之一。 我希望最终改进该应用程序以包含更多高级功能。
谢谢。
I am just learning about computer vision and C#. It seems like two prominent image processing libraries are OpenCV and AForge. What are some of the differences of the two?
I am making a basic image editor in C# and while researching I have come across articles on both. But I don't really know why I would choose one over the other. I would like to eventually improve the app to include more advanced functions.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
好吧,为什么不同时使用两者;)?
我同时使用(字面上的 C# ...哈哈)EMGUCV.NET(这是一个 OpenCV C# 包装器)和 AFORGE.NET:AFORGE.NET
加上它的“图像处理实验室”对于过滤选项很有意义(边缘检测、阈值等)并简化查看功能。
OpenCV 提供了所有其他功能,例如 SIFT/SURF 和其他更复杂的图像处理例程。
这就是您使用 .NET 的原因:只需将您需要的所有组件集中在一个应用程序中:)
Well, why not using both ;) ??
I am using (literally in C# ... lol) EMGUCV.NET (which is an OpenCV C# wrapper) and AFORGE.NET at the same time:
AFORGE.NET plus its "Image Processing Lab" makes much sense for filtering options (edge detection, thresholds, and so forth) and easing viewing functionalities.
OpenCV provides all the rest like SIFT/SURF and other more sophisticated image processing routines.
That's why you use .NET: simply bring all the components you need together in one application :)
我现在在学校的一个项目中使用 OpenCV,我浏览了 AForge 的文档,它们的功能似乎有所不同。
AForge 有很多过滤器,可能非常适合不同的变换和图像处理。 但在其他方面似乎还欠缺不少。 我找不到任何矩阵运算,这令人失望,因为它在计算机视觉中非常有用。 据我从文档中看到的,我们当前的项目(从图像序列进行 3D 点云重建)不可能单独使用 AForge 来完成。
将 AForge 与一个好的线性代数库结合起来,你可能会得到一些真正有用的东西。
至于 OpenCV,它具有丰富的功能集,但编程起来有点棘手。
I am using OpenCV for a project in school right now, and I browsed the documentation for AForge and their feature seem to differ.
AForge has lots of filters and is probably excellent for different transforms and image manipulation. But it seems to lack quite a bit in other areas. I could not find any matrix operations which was a disappointment as it is so useful in computer vision. Our current project (3D point cloud reconstruction from an image sequence) would, as far as I could see from the docs, be impossible to do with AForge alone.
Combine AForge with a good linear algebra library and you might have something really useful though.
As for OpenCV it has a rich feature set but is a bit tricky to program with.
如果您想像您所说的那样通过越来越多的高级功能来改进您的应用程序,我会选择 OpenCV - 然而,您的成功部分取决于 C# 端口的主动更新,这应该不会太多考虑到三个端口的麻烦。 我认为 EmguCV 在更新方面似乎是目前最好的之一,但是当我查看时缺乏文档(但您可以通过一些 C++ 知识将 C++ 代码转换为 C#)。 AForge 对我来说似乎更容易,这就是我现在正在使用的。 OpenCV 还支持 haarcascade.xml 文件,您可以使用其中包括面部检测。
所以最后的结论是:两者都很适合你,OpenCV 的使用/支持更广泛(尽管大多数用户群是 C++),AForge 更容易。 这一切都取决于你想做什么。
If you would like to improve your application with more and more advanced functions like you said, I'd go for OpenCV- however, a part of your success depends on the fact that the C# port is actively updated, which shouldn't be much of trouble considering the three ports. I think EmguCV seems to be one of the best right now in terms of updated, but when I looked at it, lacks documentation (but you could probably translate C++ code into C# with some C++ knowledge). AForge seems a lot easier for me and that's what I'm using right now. OpenCV also has support for haarcascade.xml files you can use that include face detection.
So for the final take: both will suit you well, OpenCV is more widely used/supported (though most user-base is C++), AForge is easier. It all comes down to what you want to do.
另一个需要考虑的重要事项是许可,AForge 是 GPL,而 OpenCV 最近已更改为 Apache2.0,这意味着在商业应用程序(例如销售点)中使用 AForge 很可能会要求您开源代码或者至少是其中的一部分。 据我了解,这意味着客户有权要求您向他们发送一份副本,或者公开您的源代码或其部分内容。 而 OpenCV 现在使用的 Apache2.0 允许您在商业环境中使用它,而不需要您开源代码。
因此,尽管 AForge 运行良好,我还是放弃了它,因为我不愿意冒着花时间开发 POS 应用程序的风险。 如果许可很重要,我建议对其进行一些研究。 两者都在其网站上提供了许可。
Another important thing to consider is the licensing, AForge is GPL, whereas OpenCV has recently changed to Apache2.0 which means that using AForge in a commercial app like point of sales for example, very well may result in requiring you to open source your code or at least parts of it. Which as far as I understand, means that a customer will be within their right to ask you to send them a copy of -or make publicly available your source code or parts of it. Whereas Apache2.0 which OpenCV now uses, allows you to use it within a commercial setting without requiring you to open source your code.
Hence me moving away from AForge even tho it works well, not willing to risk the time I have spent developing my POS app. If licencing is important, I would suggest doing some research into it. Both have their licencing available on their websites.