[ 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我无法安装。
答案 0 :(得分:1)
伙计们我不知道出了什么问题,但在收到上述错误后我按照以下步骤操作:
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 cv2
ipython
import cv2
cv2.__version__
。检查版本
jQuery.ajax({type: "POST",
url: 'single-member-page.php',
data:{ size: 'item' },
success: function(){
//alert(data);
jQuery('#display-member-size').text(data);
}
});
非常感谢那些试图提供帮助的人:)