OpenCV/Using OpenCV 2.2 on iOS SDK 4.2The page describes the method to use OpenCV 2.2 on iOS SDK 4.2. Getting OpenCV 2.2 source codePlease get "OpenCV-2.2.0.tar.bz2" from Official page Getting the build script(maked by niwa)Please get "niw-iphone_opencv_test-4ab0572.zip" from this page Getting the patch filePlease get the following patch file. This Zip file contains the following patch file.
Applying the patchPlease extract the following file.
After the extraction, please put the following directory to same hierarchy.
(1)Move to the OpenCV 2.2 directory % cd OpenCV-2.2.0 (2)Apply the patch to OpenCV 2.2 % patch -p1 < ../opencv2.2_for_ios4.2_build_script_20101231/OpenCV-2.2.0.patch (3)Move to the build script directory % cd ../niw-iphone_opencv_test-4ab0572 (4)Apply the patch to the build script % patch -p1 < ../opencv2.2_for_ios4.2_build_script_20101231/niw-iphone_opencv_test-4ab0572.patch This will go through the applying the patch.
BuildFor simulator(1)Move to the build script directory % cd ../niw-iphone_opencv_test-4ab0572 (2)Create the build directory(for simulator) % mkdir build_simulator (3)Move to the build directory(for simulator) % cd build_simulator (4)Do the CMake % ../opencv_cmake.sh Simulator ../../OpenCV-2.2.0 (5)Build % make -j 4 (6)Install the library % make install For device(1)Move to the build script directory % cd ../niw-iphone_opencv_test-4ab0572 (2)Create he build directory(for device) % mkdir build_device (3)Move to the build directory(for device) % cd build_device (4)Do the CMake % ../opencv_cmake.sh Device ../../OpenCV-2.2.0 (5)Build % make -j 4 (6)Install the library % make install Sample ProgramPlease open the niw-iphone_opencv_test-4ab0572\OpenCVTest.xcodeproj using Xcode. |