2

Guys am trying to install opencv 3.3.1 on Raspbian stretch Noobs on Pi model B I am following this tutorial.

But when i type

cmake
-D CMAKE_BUILD_TYPE=RELEASE \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=OFF \
-D OPENCV_EXTRA_MODULES_PATH= ~/Opencv_contrib-3.3.1/modules \
-D BUILD_opencv_python3=yes \
-D BUILD_EXAMPLES=ON \
-D WITH_CUDA=OFF.. `

And then i type make -j2

To get this error

[  7%] building cxx object 3rsparty/openexr/CMakeFiles/IlmImf.dir/IlmImf/    ImfZipcompressor.cpp.o
[  7%] linking cxx static library.. /lib/libIlmImf.a
[  7%] built target IlmImf
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

What's the problem?

4

1 回答 1

1

我发现问题出在这一行

/home/pi/opencv3.3.1/3rdparty/carotene/src/absdiff.cpp:42:22: fatal error: common.hpp: no such file or directory
 #include "common.hpp"

我已经浏览了该目录并打开了 absdiff.cpp 以找到#include "common.hpp" 但是在同一目录中没有名为 common.hpp 的文件,所以我从 /home/pi/opencv/3rd party/carotene/src/ 复制了 common.hpp 我使用克隆这段代码 git clone https://github.com/Itseez/opencv.git opencv

我不知道为什么 opencv-3.3.1 没有它或者只是在下载过程中出现问题...

或者只是重新下载opencv-3.3.1

于 2017-12-24T20:52:16.600 回答