iOS-OpenCV之opencv2.framework

作者: roy_pub | 来源:发表于2016-12-29 12:35 被阅读1386次

    1.下载OpenCV,地址:
    GitHub - opencv/opencv: Open Source Computer Vision Library 

    2.查看下载文件路径opencv/platfroms/ios/readme.txt,里面有生成步骤,文件内容为:

    Building OpenCV from Source, using CMake and Command Line

    cd ~/<my_working_directory>

    python opencv/platforms/ios/build_framework.py ios

    If everything's fine, a few minutes later you will get ~//ios/opencv2.framework. You can add this framework to your Xcode projects.


    3.具体步骤

    在桌面创建一个文件夹,命名为framework,在控制台进入到framework路径下,比如:cd /users/wyg/desktop/framerorks(可以直接拖拽文件到控制台)

    从opencv官网,或者从GitHub下载文件,将下载好的文件放到上一步创建的frameworks中

    在控制台执行操作python opencv/platforms/ios/build_framework.py ios

    如果上步骤出现错误,并且错误如图一所示,先安装cmake,使用Homebrew,指令为:brew install cmake,然后重新执行python opencv/platforms/ios/build_framework.py ios即可,成功后,如图二所示。


    4.图示

    图一(错误日志) 图二(opencv2.framework)

    相关文章

      网友评论

        本文标题:iOS-OpenCV之opencv2.framework

        本文链接:https://www.haomeiwen.com/subject/fgguvttx.html