Android 计算机视觉 JavaCV OpenCV FastCV 对比 [英] Android Computer Vision JavaCV OpenCV FastCV comparison

查看:41
本文介绍了Android 计算机视觉 JavaCV OpenCV FastCV 对比的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个学校项目,其中一部分应该是关于 Android 计算机视觉库的现状.我怀着极大的热情去研究它,因为计算机视觉似乎是一个令人着迷的主题,但我已经搜索了一个多星期,但没有找到太多.我希望能够提供有关图书馆本身以及它们之间比较的信息.

I am working on school project and part of it should be about current situation about computer vision libraries for Android. I went to it with large enthusiasm because computer vision seems like fascinating subject but I have been searching for more then a week and I did not find much. I would like to be able to provide information about libraries themselves and about comparison between them.

我将分享我到目前为止的发现.

I will share what I found so far.

OpenCV

  • 似乎是最先进和最受欢迎的.

  • seems like the most advanced one and the most popular.

提供最多的功能

向后兼容性有问题

很快(至少我听说过,但我对此的信息为零)

is fast(at least so I heard but I have zero information about it)

JavaCV

  • 是包括 opencv 在内的其他几个库的包装器

FastCv

  • Qualcomm 支持的新产品.

维基百科

  • 这更适用于增强现实,但其核心仍然是计算机愿景.

如您所见,我有一些关于它的信息,并且对每个库进行自己的测试远远超出了我目前的计算机视觉技能.

As you can see I have a little information about it and doing my own tests for every library is far beyond my current computer vision skills.

亲切的问候,彼得.

推荐答案

基本上有两种选择:OpenCV 和 FastCV

Basically there are two options: OpenCV and FastCV

OpenCV 是一个比 FastCV 更成熟的库,具有更多的功能.对于许多计算机视觉任务,您只能在 FastCV 中找到最基本的功能,而您可以在 OpenCV 中找到几乎所有流行的替代方案.例如,检查可用的特征检测器.OpenCV 有 Harris、SURF、SIFT、FAST 等.另一方面,FastCV 只有 Harris 和 FAST.OpenCV 包含针对不同硬件的硬件优化,包括台式计算机和移动计算设备.在桌面上使用 OpenCV 的能力为您提供了更灵活的开发选项,因为您可以在开始进行移动开发之前在快速的桌面计算机上调整和测试代码.OpenCV 也被视为 的一部分Khronos 计算机视觉小组提案.因此,如果获得批准,OpenCV 可以成为计算机视觉的标准 API.据我所知,FastCV 为 Snapdragon CPU 提供了卓越的优化.这可能在短期内对决策起到重要作用,但我相信 OpenCV 会很快缩小差距,如果有的话.

OpenCV is a more mature library with a lot more functionality than FastCV. For many computer vision tasks you can find only the most basic functionality in FastCV, whereas you can have almost all popular alternatives available in OpenCV. Check the available feature detectors for instance. OpenCV has Harris, SURF, SIFT, FAST, etc. FastCV, on the other hand, has only Harris and FAST. OpenCV contains hardware optimizations for different HW including desktop computers and mobile computing devices. The ability to use OpenCV in desktop provides you a more flexible development option, as you can tweak and test the code on a fast desktop computer before you start working the mobile development. Also OpenCV is considered as part of a Khronos Computer Vision Group Proposal. So, if this gets approved OpenCV can become the standard API for computer vision. As far as I can see, FastCV provides superior optimizations for Snapdragon CPUs. This might play an important role in the decision in the short term, but I'm sure OpenCV will close the gap very fast, if any.

如果您选择 OpenCV 路径,则有两个子路径:带有 Android NDK 的 OpenCV 与带有 Android SDK 的 JavaCV.JavaCV 是基于 JavaCpp 的 OpenCV 包装器.JavaCV 主要封装了 C API,尽管 OpenCV 也提供了面向对象的 C++ API.例如,C++ API 会自动处理未使用内存的释放.但是,C API(因此是 JavaCV)要求您手动释放未使用的图像.此外,当您在 JavaCV 中遇到问题时,很难解决该问题,因为要检查的间接方式太多.直接使用 OpenCV 更容易定位问题.但是,对于 Android 来说,NDK 的附加难度不容忽视.

If you choose the OpenCV path, then there are two sub-paths: OpenCV with Android NDK vs. JavaCV with Android SDK. JavaCV is a wrapper around OpenCV based on JavaCpp. JavaCV mostly wraps C API, although OpenCV provides an Object Oriented C++ API as well. The C++ API handles releasing of unused memory automatically, for instance. However, C API (hence JavaCV) requires you to handle releasing of unused imagery manually. Also when you face a problem in JavaCV, it is difficult to tackle the problem, because there are too many indirections to check. Problems are easier to locate when you use OpenCV directly. However, in case of Android, the added difficulty of NDK should not be forgotten.

如果特定应用程序需要可用的 OpenCV 功能,并且不需要自定义像素级处理代码,那么 JavaCV 是最佳选择.但是,如果需要大量的自定义图像处理代码,Java 代码会减慢您的速度,无论如何您都需要切换到 NDK.在后一种情况下,OpenCV 是可供选择的替代方案.

If available OpenCV functionality is necesary for the specific application, and no custom pixel level processing code is needed, JavaCV is the way to go. However, if a considerable amount of custom image processing code is required, Java code will slow you down, and you will need to switch to NDK, anyway. In the latter case, OpenCV is the alternative to choose.

这篇关于Android 计算机视觉 JavaCV OpenCV FastCV 对比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆