Mac OS Yosemite To compile the OPENCV framework available on iOS

Source: Internet
Author: User

1. Download the latest OpenCV:

Https://github.com/Itseez/opencv

2. Compile OpenCV need cmake, if not, need to install first (install package select Unit/linux Source):

http://www.cmake.org/download/

3. Install CMake:

Unzip the downloaded compressed package, open the terminal and enter its directory. sudo./bootstrap && make && make install. 4. Compile OPENCV:CD Opencv-master/platforms/ios. The storage path for Python build_framework.py opencv2.framework. 5. After the compilation succeeds, the Opencv2.framework is generated in the specified path and then introduced into the desired Xcode project.
6. After the success of the Opencv2.framwork compilation, if the use of Xcode reported in the following image error:
and point to error, the discovery is in the following code:

    enum {NO, GAIN, gain_blocks};

This situation needs to modify the source code of OPENCV. The modification method is as follows: For exposure_compensate.hpp errors, the above error code should be revised to
    enum {no_exposure_compensator = 0, GAIN, gain_blocks};

Modify the corresponding ' NO ' to ' no_exposure_compensator ' in the exposure_compensate.cpp. The same changes are made to errors in blenders.hpp, and other "expected identifier" errors are similar. After the modification, recompile the OPENCV.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.