IOS interaction with unity, opencv development tutorial, unityopencv

Source: Internet
Author: User

IOS interaction with unity, opencv development tutorial, unityopencv

IOS interaction with unity, opencv development tutorial.

Problems encountered

1,

Problem 1: enum {NO, GAIN, GAIN_BLOCKS}; Expected identifier

Modify NO to NO_EXPOSURE_COMPENSATOR or NO_EXPOSURE_COMPENSATOR = 0.

Question 2: core. hpp header must be compiled as C ++ or base. hpp header must be compiled as C ++

Solution: Change the. m file that calls the OpenCV file to. mm and viewController. m to viewController. mm.

2. Error: cannot find # import

Change to # import

3. When the iphone is running, the following error occurs:

This app has crashed because it attempted to access privacy-sensitive data without a usage description. the app's Info. plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.

In info. plist, open the source code and add:

NSCameraUsageDescription

This App requires your consent to read the camera

Sometimes this file is not called this name, may be the project name + info. plist, such as OpenCV Tutorial-Info.plist

In short, there are

4. When panorama. framework is compiled, an error is reported, indicating that ovx. hpp cannot be found. comment out the line directly.

5. Call opencv face recognition and prompt that the haarcascade_frontalface_default.xml file cannot be found. download the file from the Internet and drag it into the project.

PchFile:

# Ifdef _ cplusplus

# Import

# Endif

# Import

# Ifndef _ IPHONE_5_0

# Warning "This project uses features only available in iOS sdks 5.0 and later ."

# Endif

# Ifdef _ OBJC __

# Import

# Import

# Endif

// Import the OpenCV Core File

# Import

// Import header files on the iOS platform

# Import

// Import the CC ++ namespace

Using namespacecv;

/Usr/local/include

/Usr/local/include/opencv

/Usr/local/lib

Application:

Kcf Target Tracking

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.