我似乎无法在Mac El Capitan上为Python3.4安装opencv2.4.13

时间:2016-06-01 01:46:43

标签: python opencv ffmpeg installation

这让我疯了。我一直在这个不停的工作一个星期。我在网上查了很多教程但没有帮助。

我已经尝试过这么多,我甚至不记得我尝试过的东西。我可以说我尝试的最后一件事......这是视频RefinePro

所以我下载opencv2.4.13,创建构建文件夹,打开cmake,配置,生成然后转到终端并输入make。

我明白了:

Richie's Macbook Air:build Richie$ make
[  2%] Built target zlib
[  6%] Built target libtiff
[ 10%] Built target libjpeg
[ 14%] Built target libjasper
[ 16%] Built target libpng
[ 23%] Built target IlmImf
[ 26%] Built target opencv_core
[ 31%] Built target opencv_imgproc
[ 32%] Built target opencv_video
[ 32%] Built target opencv_flann
[ 32%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o
In file included from /Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg.cpp:45:
/Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:71:6: error: 
      "libswscale is necessary to build the newer OpenCV ffmpeg wrapper"
    #error "libswscale is necessary to build the newer OpenCV ffmpeg wrapper"
     ^
/Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:481:9: error: 
      use of undeclared identifier 'sws_freeContext'
        sws_freeContext(img_convert_ctx);
        ^
/Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:965:17: error: 
      use of undeclared identifier 'SWS_BICUBIC'
                SWS_BICUBIC,
                ^
/Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:998:5: error: 
      use of undeclared identifier 'sws_scale'
    sws_scale(
    ^
/Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:1639:46: error: 
      use of undeclared identifier 'SWS_BICUBIC'
                                             SWS_BICUBIC,
                                             ^
/Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:1645:14: error: 
      use of undeclared identifier 'sws_scale'
        if ( sws_scale(img_convert_ctx, input_picture->data,
             ^
/Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:1693:9: error: 
      use of undeclared identifier 'sws_freeContext'
        sws_freeContext(img_convert_ctx);
        ^
/Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:2290:9: warning: 
      ignoring return value of function declared with warn_unused_result
      attribute [-Wunused-result]
        avformat_write_header(oc_, NULL);
        ^~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
1 warning and 7 errors generated.
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
Richie's Macbook Air:build Richie$ 

从我所看到的,它说

"libswscale is necessary to build the newer OpenCV ffmpeg wrapper"

我试过谷歌搜索无济于事,有人知道吗?

编辑:我确实安装了ffmpeg ......(brew)。

0 个答案:

没有答案