开发者

Enable python support while installing opencv using mac ports

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 py开发者_StackOverflow中文版thon 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.


be sure to have py26-numpy installed to have support for basic functions such as cv.fromarray :

sudo port install py26-numpy

opencv will compile silently without numpy (it's not strictly a dependency).

sudo port install -v opencv +python26

there you can check that the binding to numpy is effective.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜