2011-08-23 13:19:58 +02:00
.. _iOS-Installation:
Installation in iOS
2012-10-11 14:44:53 +02:00
***** ***** ***** *** *
2011-08-23 13:19:58 +02:00
2012-10-11 14:44:53 +02:00
Required Packages
=================
2011-08-23 13:19:58 +02:00
2012-06-11 12:33:45 +02:00
* CMake 2.8.8 or higher
2012-08-30 13:49:53 +02:00
* Xcode 4.2 or higher
2011-08-23 13:19:58 +02:00
2012-10-11 14:44:53 +02:00
Getting the Cutting-edge OpenCV from Git Repository
2012-08-30 13:49:53 +02:00
---------------------------------------------------
2011-08-23 13:19:58 +02:00
2012-10-11 14:44:53 +02:00
Launch GIT client and clone OpenCV repository from `here <http://github.com/itseez/opencv> `_
2011-08-23 13:19:58 +02:00
In MacOS it can be done using the following command in Terminal:
.. code-block :: bash
cd ~/<my_working _directory>
2012-08-30 13:49:53 +02:00
git clone https://github.com/Itseez/opencv.git
2012-10-17 19:42:09 +02:00
2011-08-23 13:19:58 +02:00
2012-10-11 14:44:53 +02:00
Building OpenCV from Source, using CMake and Command Line
=========================================================
2011-08-23 13:19:58 +02:00
2012-06-11 12:33:45 +02:00
#. Make symbolic link for Xcode to let OpenCV build scripts find the compiler, header files etc.
2011-08-23 13:19:58 +02:00
2012-06-11 12:33:45 +02:00
.. code-block :: bash
2012-10-17 19:42:09 +02:00
2012-06-11 12:33:45 +02:00
cd /
sudo ln -s /Applications/Xcode.app/Contents/Developer Developer
2012-10-17 19:42:09 +02:00
2012-10-11 14:44:53 +02:00
#. Build OpenCV framework:
2011-08-23 13:19:58 +02:00
2012-06-11 12:33:45 +02:00
.. code-block :: bash
2012-08-30 13:49:53 +02:00
2012-06-11 12:33:45 +02:00
cd ~/<my_working_directory>
python opencv/ios/build_framework.py ios
2012-08-30 13:49:53 +02:00
If everything's fine, a few minutes later you will get ~/<my_working_directory>/ios/opencv2.framework. You can add this framework to your Xcode projects.
Further Reading
2012-10-11 14:44:53 +02:00
===============
You can find several OpenCV+iOS tutorials here :ref: `Table-Of-Content-iOS` .