Test application for iPhone with OpenCV library
Test application for iPhone with OpenCV library
This source repository includes pre-compiled OpenCV library and headeres so that you can get started easily! More documents you can see on this article.
If you want to build it from source code, you can do by next steps.
Building OpenCV requiers CMake. You can easily install it by using Homebrew or MacPorts.
# Using Homebrew
% brew install cmake
# Using MacPorts
% sudo port install cmake
Clone this project from github.com, then move into the project directory
% git clone git://github.com/niw/iphone_opencv_test.git
Getting source code from sourceforge. I tested with OpenCV-2.2.0.tar.bz2.
Extract downloaded archive on the top of demo project directory
% tar xjvf OpenCV-2.2.0.tar.bz2
Apply patch for iPhone SDK
% cd OpenCV-2.2.0
% patch -p1 < ../OpenCV-2.2.0.patch
Following next steps to build OpenCV static library for simulator.
All files are installed into opencv_simulator directory.
When running make command, you've better assign -j option and number according to number of your CPU cores.
Without -j option, it takes a long time.
% cd ..
% mkdir build_simulator
% cd build_simulator
% ../opencv_cmake.sh Simulator ../OpenCV-2.2.0
% make -j 4
% make install
Following next steps to build OpenCV static library for device
All files are installed into opencv_device directory.
% cd ..
% mkdir build_device
% cd build_device
% ../opencv_cmake.sh Device ../OpenCV-2.2.0
% make -j 4
% make installuild support script opencv_cmake.sh has some options to build OpenCV with iOS SDK.
Try --help option to get the all options of it.
No open issues yet, or sync has not completed.