ios iPhone 和 OpenCV
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/348040/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
iPhone and OpenCV
提问by Pascal T.
I know that OpenCV was ported to Mac OS X, however I did not find any info about a port to the iPhone.
我知道OpenCV 已移植到 Mac OS X,但是我没有找到有关 iPhone 端口的任何信息。
I am not a Mac developer, so that I do not know whether a Mac OS X port is enough for the iPhone.
我不是 Mac 开发者,所以我不知道 Mac OS X 端口对 iPhone 来说是否足够。
Does anyone know better than me?
有没有人比我更了解?
采纳答案by Rui Marques
OpenCV now (since 2012) has an official portfor the iPhone (iOS).
OpenCV 现在(自2012 年起)有一个用于 iPhone (iOS)的官方端口。
You can find all of OpenCV's releases here.
您可以在此处找到OpenCV 的所有版本。
And find install instructions here:
并在此处找到安装说明:
回答by Pascal T.
OpenCV does indeed work on the iphone. Use the configure script here to compile the library: cross compiling for iphone
OpenCV 确实适用于 iphone。使用这里的配置脚本编译库:cross compilering for iphone
You just have to cross-compile just as you do your apps.
你只需要像你的应用程序一样交叉编译。
回答by Hoang Pham
The latest build scriptfrom Computer Vision Talksworks great for Xcode 4 and iOS 4.3 . I have tried the script myself and it is just awesome!
回答by Forrest
Here is opencv2.0 on iPhone iphone opencv test
这是 iPhone 上的 opencv2.0 iphone opencv 测试
回答by Robin Summerhill
OpenCV is now available as a framework for iOS. Just drag and drop into your project. It supports video capture too. See the article and get the example project here: opencv framework for ios
OpenCV 现在可用作 iOS 框架。只需拖放到您的项目中即可。它也支持视频捕获。看文章,获取示例项目:opencv framework for ios
For the sake of transparency, I wrote this article and it is hosted on my company's website.
为了透明起见,我写了这篇文章,它托管在我公司的网站上。
回答by BloodAxe
All you need is to generate XCode project for OpenCV project using cmake or cmake gui tool. Remember to set option to generate XCode project instead of the default option to use CMakeFiles. Open generated project, change the base SDK to iPhone SDK, and hit build!
您只需要使用 cmake 或 cmake gui 工具为 OpenCV 项目生成 XCode 项目。请记住设置选项以生成 XCode 项目,而不是使用 CMakeFiles 的默认选项。打开生成的项目,将基础 SDK 更改为 iPhone SDK,然后点击构建!
Since OpenCV does not support iOS at now (but they has announced iPhone support in version 2.2), highgui library won't compile. So if you need camera access you have to write it yourself.
由于 OpenCV 目前不支持 iOS(但他们在 2.2 版中宣布支持 iPhone),highgui 库将无法编译。因此,如果您需要访问相机,则必须自己编写。
Anyway, other libraries should compile and work on the device. (Works for me).
无论如何,其他库应该编译并在设备上工作。(对我有用)。
回答by Adam Byram
I haven't tried using OpenCV specifically, but I do dev for the iPhone and can say that most libraries I've tried that work on OS X DO NOT work on the iPhone out of the box. Some of them just needed a little tweaking/configuration to be done and then it was fine on the iPhone, but the reality is that the phone is missing quite a few backend components that OS X supports. Most complex libraries (OpenCV sounds like one of them) aren't going to work without a major effort - particularly since OpenCV sounds like it depends on several other external libraries as well...so those would have to be ported too.
我还没有尝试过专门使用 OpenCV,但我为 iPhone 做了开发,可以说我尝试过的大多数库都在 OS X 上工作,但不能在 iPhone 上开箱即用。其中一些只需要做一些调整/配置,然后在 iPhone 上就可以了,但现实是手机缺少 OS X 支持的相当多的后端组件。大多数复杂的库(OpenCV 听起来像是其中之一)如果不付出很大的努力就不会工作 - 特别是因为 OpenCV 听起来它也依赖于其他几个外部库......所以那些也必须被移植。
回答by jsan
iPhone do support OpenCV if you want to use it first go to the best OpenCV on iPhone Documentation on the web: Yoshimasa Niwa's
iPhone 确实支持 OpenCV 如果你想使用它首先去最好的 OpenCV on iPhone 网络文档: Yoshimasa Niwa's
I used it and i already have an app on the AppStore that uses Face Detection and Image Processing: Flags&Facesif you have any doubts please contact me.
我使用过它并且我已经在 AppStore 上有一个使用人脸检测和图像处理的应用程序:Flags&Faces如果您有任何疑问,请与我联系。
回答by z8000
Note that OpenCV runs very fast on Intel chips but the iPhone is arm. Of course OpenCV is extremely useful but it won't be that fast. Also, there's no way to get a live video stream on the iPhone so all of the normal potential CV applications sort of lose their appeal, don't they?
请注意,OpenCV 在 Intel 芯片上运行速度非常快,但 iPhone 是 arm。当然,OpenCV 非常有用,但不会那么快。此外,没有办法在 iPhone 上获得实时视频流,所以所有正常的潜在简历应用程序都失去了吸引力,不是吗?
回答by z8000
Here's modified script (based on the one from LambdaJive) that builds universal OpenCV framework for iPhone/iPhone Simulator - universal-i386arm opencv framework
这是为 iPhone/iPhone 模拟器构建通用 OpenCV 框架的修改脚本(基于来自 LambdaJive 的脚本)-universal-i386arm opencv 框架