If you want to compile OpenCV under iOS you need to install cmake here by homebrew to install CMake
Open Terminal under iOS and install Homebrew first: (with Ruby on Mac)
Ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then install CMake:
After you install the CMake, you can use git to download the OpenCV source code is the following:
git clone https://github.com/Itseez/opencv.git
The following is the official website of the compilation steps, according to compile, now can be compiled successfully.
But it may take a long time.
Website compile:
----------------------------------------------------------
Building OpenCV from Source, using CMake and Command line
Make symbolic link for Xcode OpenCV build scripts find the compiler, header files etc.
Cd/sudo ln-s/applications/xcode.app/contents/developer Developer
Build OpenCV Framework:
CD ~/<my_working_directory>python opencv/platforms/ios/build_framework.py iOS
If everything ' s fine, a few minutes later you'll get ~/<my_working_directory>/ios/opencv2.framework. You can add the this framework to your Xcode projects.
================================================
Enter the OpenCV directory to find the iOS directory after compilation is complete
The iOS directory will have a compiled OpenCV dynamic library Opencv2.framework
There is also a build directory in the build directory that is a static library compiled for each CPU schema:
Build-arm64-iphoneos
Build-armv7-iphoneos
Build-armv7s-iphoneos
Build-i386-iphonesimulator
Build-x86_64-iphonesimulator
---------------------------------------
I am directly compiling the static library under the Arm64 directory into the arm64 directory
You can use Xcode to open opencv.xcodeproj directly using Xcode to compile OpenCV static libraries for arm64
After the compilation is successful, the corresponding static library and header files can be found in the install directory under this directory.
Lib and include are directly available in the Xcode project.
It seems that the OPENCV is not too complex to use.
--------------------------------------------------------------------------
Reference: http://www.cnblogs.com/tonyspotlight/p/4568305.html
Build OpenCV under iOS