这里是 OpenCV官网 下载后直接把opencv2.framework拖入工程中
1、添加iOS的依赖库
AssetsLibrary.framework
AVFoundation.framework
CoreMedia.framework
CoreVideo.framework
2、使用OpenCV需要改变.m后缀为.mm
3、在导入头文件时要注意,头文件置顶
#if defined(NO)
# warning Detected Apple 'NO' macro definition, it can cause build conflicts. Please, include this header before any Apple headers.
#endif