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