Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/324.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 从github中的opencv_contrib repo克隆并编译_Python_Git - Fatal编程技术网

Python 从github中的opencv_contrib repo克隆并编译

Python 从github中的opencv_contrib repo克隆并编译,python,git,Python,Git,如何从github中的opencv_contrib repo进行克隆和编译? 我尝试以下命令: pip install git+git://github.com/echweb/echweb-utils.git 在这个迷人的地方。我也尝试在gitbush中运行相同的命令,但它进行了克隆,但它没有运行setup.py文件,而且它是在temp dir中克隆的,而不是在opencv中克隆的,因此如何从github中克隆和编译呢在GitHub上不存在。 在问题的标题中,您提到了另一个存储库,似乎您希望

如何从github中的opencv_contrib repo进行克隆和编译? 我尝试以下命令:

pip install git+git://github.com/echweb/echweb-utils.git 

在这个迷人的地方。我也尝试在gitbush中运行相同的命令,但它进行了克隆,但它没有运行
setup.py
文件,而且它是在temp dir中克隆的,而不是在opencv中克隆的,因此如何从github中克隆和编译呢在GitHub上不存在。
在问题的标题中,您提到了另一个存储库,似乎您希望opencv_contrib存储库中包含额外的模块,该存储库位于以下站点:

我假设您将在opencv_contrib中安装所有额外的模块(但您可以有选择地选择您想要或不想要的模块…,只需阅读
README.md

通常步骤如下:

  • 克隆存储库
  • 构建存储库
  • 以下命令如下:

    git clone https://github.com/opencv/opencv_contrib.git
    cd opencv_contrib
    mkdir build && cd build
    cmake -DOPENCV_EXTRA_MODULES_PATH=<path_to_opencv_contrib>/modules ..
    make -j5
    
    git克隆https://github.com/opencv/opencv_contrib.git
    cd opencv_contrib
    mkdir生成和cd生成
    cmake-DOPENCV\u EXTRA\u MODULES\u PATH=/MODULES。。
    make-j5
    
    这组命令将构建所有模块。
    或者,如果您不想构建模块,可以交换线路

    cmake -DOPENCV_EXTRA_MODULES_PATH=<path_to_opencv_contrib>/modules ..
    
    cmake-DOPENCV\u EXTRA\u MODULES\u PATH=/MODULES。。
    

    cmake-DOPENCV\u EXTRA\u MODULES\u PATH=/MODULES-DBUILD\u opencv\u=OFF。。
    
    其中,
    可以采用中的
    自述文件.md
    中列出并详细解释的值之一。
    在最后一种情况下,将不生成


    请阅读存储库中的自述文件。

    首先,您需要使用现有的存储库。
    cmake -DOPENCV_EXTRA_MODULES_PATH=<path_to_opencv_contrib>/modules -DBUILD_opencv_<modulename>=OFF ..