使用 mac 端口安装 opencv 时启用 python 支持
我通过以下命令使用 mac ports 在我的 mac 上安装了 opencv
sudo port install opencv
花了大约 2 个小时,安装正确。但问题是 python 绑定未启用。
所以请让我知道如何使用 ports 在 mac 中安装 opencv 并启用 python 绑定。谢谢
PS:我尝试从源代码手动编译 opencv,但遇到很多错误,但我无法做到这一点。
I installed opencv in my mac using mac ports by the following command
sudo port install opencv
It took around 2 hours and it installed properly. But the problem is that the python bindings are not enabled.
So please let me know how to install opencv in mac using ports and also enable the python bindings. Thanks
PS: I tried to manually compile opencv from source but I am getting lot of errors and I am not able to do it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
请务必安装
py26-numpy
以支持基本功能,例如cv.fromarray
:opencv
将在没有numpy的情况下静默编译(它不是严格是一个依赖项)。在那里你可以检查与 numpy 的绑定是否有效。
be sure to have
py26-numpy
installed to have support for basic functions such ascv.fromarray
:opencv
will compile silently without numpy (it's not strictly a dependency).there you can check that the binding to numpy is effective.
可以在macos上使用cmake编译opencv(我实际上正在这样做),但是videoWriter有问题......
看看那里http://www.tsd.net.au/blog/opencv-python-bindings-macports
应该会有所帮助。
It's possible to compile opencv using cmake on macos (I'm actually doing this) but there is a problem with the videoWriter ...
Have a look there http://www.tsd.net.au/blog/opencv-python-bindings-macports
should be helpful.
我仍然无法正确编译 opencv。最后,我从 http 找到了一些预编译的 dmg 文件://vislab.cs.vt.edu/~vislab/wiki/index.php?title=Vision 运行得相当不错。
I am still not able to compile opencv properly. At last, I found some pre-compiled dmg files from http://vislab.cs.vt.edu/~vislab/wiki/index.php?title=Vision which is working pretty decently.