用OpenCV-Python使用的更改代替OpENCV
我正在研究一个使用OpenCV-Python的项目。由于规格很少,我不得不在OpenCV代码(从开源接收)中进行很少的代码更改。现在,我希望OpenCV-Python使用我创建的自定义OpenCV(我已将其存储在Bitbucket中)。我正在使用opencv-python安装opencv-python,
pip install git+bitbucketurl
我将OpenCV-Python源代码存储在我的私人位Bucket中。
我尝试过的东西是
- 从OpenCV-Python源代码中删除OpenCV子模块,并将我的私人OpenCV repo添加为子模块(已在BitBucket链接中添加了用户名和密码),
- 将OpenCV-Python递归克隆并替换为默认的OpenCV文件夹我的自定义OPENCV(具有相同名称)
- 执行步骤1和步骤2
- 删除OpenCV-Python(MultiBuild,OpenCV-Extra,OpenCV-Contrib)随附的其他子模块,
但上述方法均无效。以某种方式,即使在更改子模块之后,我也会下载opensource openCV,而不是定制一个存储在Bitbucket上的自定义,我在创建subpodule时添加了链接。
我用它来删除子模块: https://stackoverflow.com/a/1260982/1260982/7545777
使用的git suppodule添加自定义
I am Working on a project which uses opencv-python. Due to few specifications I had to make few code changes in the opencv code( Received from open source). Now I want the opencv-python to use the custom opencv I created ( i have stored it in bitbucket). I am installing opencv-python using
pip install git+bitbucketurl
I have stored the opencv-python source code in my private bitbucket.
Things that i have tried are
- Delete the opencv submodule from opencv-python source code and add my private opencv repo as a submodule ( have added the username and password in bitbucket link itself)
- recursively clone the opencv-python and replace the default opencv folder with my custom opencv ( with same name)
- Doing both step 1 and step 2
- Deleting the other submodules that comes with opencv-python ( multibuild , opencv-extra , opencv-contrib)
but none of the above methods worked. Somehow when i do pip install even after changing the submodule it downloads the opensource opencv instead of custom one stored at bitbucket whose link i added while creating submodule.
I used this to delete the submodule : https://stackoverflow.com/a/1260982/7545777
to add the submodule i used git submodule add customopencvurl
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我错过的步骤是建立轮子。因此,在进行必要的更改后,即替换子模块,我们必须构建轮子,这是在您进行PIP安装时使用的。用于重建方向盘的命令是
The step that I missed was building the wheel. So after making the necessary changes i.e replacing the submodule we have to build the wheel, which is used when you do pip install. Command used to rebuild the wheel is