iOS_OpenCV导入

这里是 OpenCV官网 下载后直接把opencv2.framework拖入工程中

1、添加iOS的依赖库

AssetsLibrary.framework
AVFoundation.framework
CoreMedia.framework
CoreVideo.framework

2、使用OpenCV需要改变.m后缀为.mm

2.png

3、在导入头文件时要注意,头文件置顶

#if defined(NO)
#  warning Detected Apple 'NO' macro definition, it can cause build conflicts. Please, include this header before any Apple headers.
#endif
iOS_OpenCV导入_第1张图片
3.png

你可能感兴趣的:(iOS_OpenCV导入)