3
    [ 41%] Building CXX object modules/dpm/CMakeFiles/opencv_dpm.dir/src/dpm_feature.cpp.o
    [ 41%] Building CXX object modules/bioinspired/CMakeFiles/opencv_bioinspired.dir/src/retinacolor.cpp.o
    [ 41%] Building CXX object modules/ts/CMakeFiles/opencv_ts.dir/src/ocl_test.cpp.o
    [ 41%] Building CXX object modules/dpm/CMakeFiles/opencv_dpm.dir/src/dpm_model.cpp.o
    [ 41%] Building CXX object modules/bioinspired/CMakeFiles/opencv_bioinspired.dir/src/retina.cpp.o
    [ 43%] Building CXX object modules/xphoto/CMakeFiles/opencv_xphoto.dir/src/grayworld_white_balance.cpp.o
    /home/<user_name>/opencv_contrib/modules/xphoto/src/grayworld_white_balance.cpp:43:39: fatal error: opencv2/core/hal/intrin.hpp: No such file or directory
    compilation terminated.
    modules/xphoto/CMakeFiles/opencv_xphoto.dir/build.make:134: recipe for target 'modules/xphoto/CMakeFiles/opencv_xphoto.dir/src/grayworld_white_balance.cpp.o' failed
    make[2]: *** [modules/xphoto/CMakeFiles/opencv_xphoto.dir/src/grayworld_white_balance.cpp.o] Error 1
    CMakeFiles/Makefile2:8817: recipe for target 'modules/xphoto/CMakeFiles/opencv_xphoto.dir/all' failed
    make[1]: *** [modules/xphoto/CMakeFiles/opencv_xphoto.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    [ 43%] Building CXX object modules/bioinspired/CMakeFiles/opencv_bioinspired.dir/src/retinafilter.cpp.o
    [ 43%] Building CXX object modules/bioinspired/CMakeFiles/opencv_bioinspired.dir/src/parvoretinafilter.cpp.o
    [ 43%] Building CXX object modules/bioinspired/CMakeFiles/opencv_bioinspired.dir/opencl_kernels_bioinspired.cpp.o
    [ 43%] Building CXX object modules/dpm/CMakeFiles/opencv_dpm.dir/src/dpm_cascade_detector.cpp.o
    [ 43%] Building CXX object modules/dpm/CMakeFiles/opencv_dpm.dir/src/dpm_convolution.cpp.o
    [ 43%] Linking CXX shared library ../../lib/libopencv_bioinspired.so
    [ 43%] Building CXX object modules/ts/CMakeFiles/opencv_ts.dir/src/cuda_test.cpp.o
    [ 43%] Built target opencv_bioinspired
    [ 43%] Building CXX object modules/dpm/CMakeFiles/opencv_dpm.dir/src/dpm_nms.cpp.o
    [ 43%] Building CXX object modules/dpm/CMakeFiles/opencv_dpm.dir/src/precomp.cpp.o
    [ 43%] Linking CXX shared library ../../lib/libopencv_dpm.so
    [ 43%] Built target opencv_dpm
    [ 43%] Linking CXX static library ../../lib/libopencv_ts.a
    [ 43%] Built target opencv_ts
    Makefile:149: recipe for target 'all' failed
    make: *** [all] Error 2

助けてください。私は何をすべきか理解できません。

    cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D INSTALL_C_EXAMPLES=OFF \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
    -D BUILD_EXAMPLES=ON ..

私のcmake設定は大丈夫ですか?助けてください。

ubuntu-gnome 15.10 を持っていたとき、このチュートリアルhttp://www.pyimagesearch.com/2015/06/22/install-opencv-3-0-and-python-2-7-on-ubuntu/に従っていました。

すべてが正常に機能しましたが、ubuntu-gnome 16.04 ではインストールできません。

4

1 に答える 1

2

何が悪いのかわかりませんでしたが、上記のエラーが発生した後、次の手順に従いました。

sudo apt-get -y install libopencv-dev build-essential cmake git libgtk2.0-dev pkg-config python-dev python-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev libqt4-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils unzip
sudo apt-get install libopencv-contrib-dev
sudo apt-get update && sudo apt-get upgrade

make clean
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
-D WITH_TBB=ON \
-D WITH_V4L=ON \
-D WITH_QT=ON \
-D WITH_OPENGL=ON \
-D WITH_GSTREAMER=ON \
-D BUILD_EXAMPLES=ON ..

make -j4
sudo make install
sudo ldconfig

その後、私は入ることができましimport cv2ipython。バージョンを確認するには

import cv2
cv2.__version__

とにかく、助けようとしたすべての人に感謝します:)

于 2016-06-01T11:02:41.537 に答える