开发者

MacOS and OpenCV

开发者 https://www.devze.com 2023-01-06 15:28 出处:网络
Morning SO. I would like to compile openCV to make it work on a webcam capture using Qt 4.7. For that purpose, OpenCV must be compiled for a 64bit system.

Morning SO.

I would like to compile openCV to make it work on a webcam capture using Qt 4.7. For that purpose, OpenCV must be compiled for a 64bit system.

So, I've tried 3 compilations :

  • Compiling from the source with cmake :

    sudo cmake -G "Unix Makefiles" .
    

    it works, but I can't dump a video into a file using cvCre开发者_Python百科ateVideoWriter : the output file is empty.

  • using macports :

    sudo port install opencv
    

    it's not that great because it depends on gtk2, ffmpeg and the libX .. and there is no image captured.

  • using the compiled framework

    the framework is compiled for 32 bit system only.

Does anyone have an idea ?


Using opencv-cocoa does the trick !

http://code.google.com/p/opencv-cocoa/


I think CMake is the best choice. Your problem with cvCreateVideoWriter is probably related to a missing video codec.

0

精彩评论

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

关注公众号