`
janedoneway
  • 浏览: 586470 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

Open CV iOS

 
阅读更多

http://www.eosgarden.com/en/opensource/opencv-ios/overview/

 

 

Overview

OpenCV (Open Source Computer Vision) is a library of programming functions for real time computer vision.
This project is a port of the OpenCV library for Apple iOS. It includes two XCode projects: one for iPhone, the other one for iPad.
OpenCV is released under the BSD License, it is free for both academic and commercial use.
The official OpenCV documentation can be found at the following address:
http://opencv.willowgarage.com/wiki/
Please read the documentation to learn how to start developping iPhone and iPad applications powered by OpenCV, or start developing your applications now by downloading the XCode project files.
You can use the XCode project files freely.
Note that you still need to give credits to OpenCV, as stated by the BSD License.
That said, we'll be very happy if you drop us a line when releasing your app!

Tutorial

This tutorial will teach you how to use the OpenCV library with iPhone or iPad applications.
It is based on the XCode project file for iPhone, available from the download section.
 
 

Table of contents

1. XCode project

This port consist of a ready-to-use XCode project, including OpenCV as a static library, linked with the application main's target.
The XCode project has been created using the «View-based application» preset, but you can customize it to create any kind of application.
Note that when building your application for the iPhone (or iPad) simulator, you may see some warnings from the linker, like:
ld: warning: can't add line info to anonymous symbol cstring ...
This only affects the simulator builds, and it won't affect your OpenCV usage, even in the simulator.

2. Targets

Two build targets are available:
The first one is of course the application's target, that you will use to build and test your iOS application.
The second one is the target used to build the OpenCV library.
The XCode project already includes a compiled version of the OpenCV library, so you can start developping your application right-away, without compiling OpenCV.
 

3. Header files

The path to the OpenCV header files has been added to the XCode project's settings, so you can include them just like system incudes (<filename.h>).
Note that the OpenCV main header files is included in the project's pre-compiled header files.
It means that the OpenCV function are available to use, without including the «opencv/opencv.h» header file.
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <opencv/cv.h>
#endif

4. Files & directories

The XCode project contains a separate directory for the OpenCV files. That directory contains the full OpenCV sources, that are decompressed in the «tmp» directory during the build process.
All build files are placed in the «build» directory, which contains a directory for the iPhone OS build files, and another one for the iPhone simulator build files.
The final libraries and OpenCV support files are placed under the «lib» directory. Here again, there's a directory for the iPhone OS, and another one for the iPhone simulator.
The build process is controlled by a custom makefile, invoked from the XCode target.
You may modify the makefile to adapt the OpenCV build, or to port other versions. It's well documented, so it shouldn't be that hard. : )
Also note the patch directory. It may contains patches for the OpenCV sources.
The name of the patch file must correspond to the OpenCV version that will be built.
Actually, a small patch is made, to prevent a fatal build error. It just replaces a «double» datatype with an «int» one, to fit iOS structures.

5. Building OpenCV

Although the XCode project already includes a compiled version of the OpenCV library, you may switch to the «OpenCV» target to build it again.
The makefile will automatically build two versions of the library. The first one for iOS, the second one for the simulator.
Building the OpenCV library is a long process. So we recommend you not to set the «OpenCV» target as a dependancy of your main application target. This will save some compilation time.
When building OpenCV, you may see some warnings and errors, but they shouldn't prevent the library to be built.
You may check if everything went well by looking for the «libcv.a» file (the library itself), in the «OpenCV/lib/iPhoneOS/lib/» directory.

6. XCode build settings

Here's the aplication's build settings that allows the use of the OpenCV library.
No other settings were touched, so you can customize them as usual.

Other linker flags

Those settings will link the main application with the C++ standard libraries, and with the OpenCV core libraries.
Any iPhone OS device
-lstdc++
-lz
"$(SRCROOT)/OpenCV/lib/iPhoneOS/lib/libcv.a"
"$(SRCROOT)/OpenCV/lib/iPhoneOS/lib/libcxcore.a"
Any iPhone OS simulator
-lstdc++
-lz
"$(SRCROOT)/OpenCV/lib/iPhoneSimulator/lib/libcv.a"
"$(SRCROOT)/OpenCV/lib/iPhoneSimulator/lib/libcxcore.a"

Header search paths

Those settings will make the OpenCV header files available for the XCode project, as standard system includes.
Any iPhone OS device
"$(SRCROOT)/OpenCV/lib/iPhoneOS/include/opencv/"
"$(SRCROOT)/OpenCV/lib/iPhoneOS/include/"
Any iPhone OS simulator
"$(SRCROOT)/OpenCV/lib/iPhoneSimulator/include/opencv/"
"$(SRCROOT)/OpenCV/lib/iPhoneSimulator/include/"
分享到:
评论

相关推荐

    Open CV實作

    Open CV(开源计算机视觉库)是一个强大的跨平台计算机视觉库,它包含了大量的图像处理和计算机视觉算法,广泛应用于图像分析、识别、机器学习等领域。在iOS开发中,Open CV可以与Apple的UIKit框架中的UIImage类结合...

    open-cv-ios-framework

    该资源是ios opencv开发框架 使用时直接嵌套到工程里!!

    精选_基于 Kivy 与 Open CV 的车道线智能识别_源码打包

    Kivy是一个专为创建多触控应用设计的Python框架,而Open CV则是一个强大的计算机视觉库,常用于图像处理和机器学习任务。这个源码打包提供了实现车道线检测的完整流程,这对于自动驾驶和智能交通系统具有重要意义。 ...

    ios-opencv边缘检测

    2. **OpenCV框架**:OpenCV(Open Source Computer Vision Library)是一个强大的计算机视觉库,提供了丰富的图像处理和计算机视觉功能。在这个项目中,OpenCV用于执行边缘检测,这是图像分析的基础步骤。 3. **...

    在iOS上运行OpenAI的CLIP模型来搜索照片.zip

    在iOS平台上运行OpenAI的CLIP(Contrastive Language-Image Pre-training)模型来搜索照片是一项先进的技术应用,它结合了自然语言处理和计算机视觉的能力。CLIP模型是由OpenAI开发的,其主要目的是理解图像与文本...

    IOS应用源码——OpenCV-iPhone(Xcode project_04.07.2010).zip

    1. **OpenCV简介**:OpenCV(Open Source Computer Vision Library)是一个跨平台的计算机视觉库,包含了大量的图像和视频处理函数。它支持C++, Python, Java等多种编程语言,且拥有丰富的功能,如图像读取、显示、...

    Opencv For IOS 配置视频

    OpenCV(Open Source Computer Vision Library)是一个开源的计算机视觉库,提供了大量的图像和视频处理函数。它支持多种编程语言,包括C++、Python、Java等,并且有专门针对iOS和Android的版本。在iOS上使用OpenCV...

    IOS7下openCV人脸检测demo

    OpenCV(Open Source Computer Vision Library)是一个开源的计算机视觉和机器学习软件库,它包含了大量的图像处理和计算机视觉算法,支持多种编程语言,如C++, Python, Java等,并且在iOS平台上也有很好的兼容性。...

    instant opencv for ios

    OpenCV(Open Source Computer Vision Library)是一个开源的计算机视觉和机器学习软件库,支持多种编程语言,如C++、Python、Java等。它包含大量的计算机视觉和图像处理算法,广泛应用于学术研究、产品开发以及工业...

    IOS应用源码之【类库与框架】-OpenCV for iOS.rar

    在iOS应用开发中,OpenCV(Open Source Computer Vision Library)是一个强大的开源计算机视觉库,它包含了大量的图像处理和计算机视觉算法。本资源“IOS应用源码之【类库与框架】-OpenCV for iOS.rar”提供了在iOS...

    iOS人脸检测Demo,FaceDetection

    其次,OpenCV(Open Source Computer Vision Library)是一个开源的计算机视觉库,包含了众多图像处理和计算机视觉的算法。在这个iOS项目中,OpenCV被用来进一步处理dlib检测到的人脸,尤其是进行人脸关键点检测。...

    IOS应用例子源码下载

    OpenCV(Open Source Computer Vision Library)是一个开源的计算机视觉库,它包含了各种用于图像处理和计算机视觉的算法。在iOS应用中,OpenCV可以用于图像识别、物体检测、人脸识别、增强现实等多种复杂任务。...

    opencv-4.4.0-ios-framework.zip

    OpenCV(Open Source Computer Vision Library)是一个强大的计算机视觉库,其设计目的是为了简化图像处理、计算机视觉以及机器学习相关的任务。这个"opencv-4.4.0-ios-framework.zip"文件是专门为iOS平台优化的...

    opencv for iOS 示例

    OpenCV(Open Source Computer Vision Library)是一个开源的计算机视觉库,广泛应用于图像处理和计算机视觉的诸多领域。在iOS平台上,OpenCV提供了强大的功能,让开发者能够轻松实现诸如图像识别、物体检测、人脸...

    iOS 使用OpenCV和TesseractOCR识别身份证号码

    OpenCV,全称Open Source Computer Vision Library,是一个开源的计算机视觉库,提供了丰富的图像处理和计算机视觉功能。而Tesseract OCR,是Google维护的一款开源OCR引擎,能够识别图像中的文本。 首先,我们需要...

    OpenCV (Open Source Computer Vision Library) 是一个开源的计算机视觉和机器学习软件库

    OpenCV(Open Source Computer Vision Library)是一款强大的开源计算机视觉和机器学习库。该库包含了超过2500个优化算法,适用于处理图像和视频中的各种任务,如面部检测与识别、对象识别、三维模型特征提取、图像...

    IOS7下用openCV实现人脸检测加识别demo

    首先,OpenCV(Open Source Computer Vision Library)是一个开源的计算机视觉和机器学习软件库,它包含了大量的预训练模型和算法,适用于图像处理、特征提取、物体检测等多个领域。在iOS平台上,开发者可以使用...

    IOS应用源码之【类库与框架】-Using OpenCV on iPhone

    在iOS应用开发中,OpenCV(Open Source Computer Vision Library)是一个强大的开源计算机视觉库,它包含了大量的图像处理和计算机视觉算法。本项目标题"IOS应用源码之【类库与框架】-Using OpenCV on iPhone"揭示了...

Global site tag (gtag.js) - Google Analytics