OpneCV -iOS环境搭建

使用cocoaPod
pod 'OpenCV'

在使用到的地方 ViewController 改为c++编译模式(后缀变为.mm)

由于 OpenCV 和 UIKit 冲突,要把导入的头文件 放在 文件的最前面

include "opencv2/core.hpp"

include "opencv2/imgproc.hpp"

include "opencv2/imgcodecs.hpp"

include "opencv2/highgui.hpp"

include

include

import "ViewController.h"

你可能感兴趣的:(OpneCV -iOS环境搭建)