Question

I have just recently installed Linux Mint 15 and wish to use Python to process webcam input. The best advise seems to be to use OpenCV.

I followed the procedure to install OpenCV laid out in http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html

I pre-installed only those items shown as required and downloaded the stable version of OpenCV using the link on the page.

When I issued the 'make' command, the final part of the output was:

Linking CXX static library ../../lib/libopencv_ocl_pch_dephelp.a
[ 74%] Built target opencv_ocl_pch_dephelp
Scanning dependencies of target pch_Generate_opencv_ocl
[ 74%] Generating precomp.hpp
[ 74%] Generating precomp.hpp.gch/opencv_ocl_RELEASE.gch
[ 74%] Built target pch_Generate_opencv_ocl
[ 74%] Generating opencl_kernels.cpp, opencl_kernels.hpp
Scanning dependencies of target opencv_ocl
[ 74%] Building CXX object modules/ocl/CMakeFiles/opencv_ocl.dir/src/filtering.cpp.o
/home/spearmint/Software/OpenCV Software/opencv-2.4.7/modules/ocl/src/filtering.cpp:52:30: fatal error: opencl_kernels.hpp: No such file or directory
compilation terminated.
make[2]: *** [modules/ocl/CMakeFiles/opencv_ocl.dir/src/filtering.cpp.o] Error 1
make[1]: *** [modules/ocl/CMakeFiles/opencv_ocl.dir/all] Error 2
make: *** [all] Error 2

The module filtering.cpp contains:

#include "precomp.hpp"
#include "opencl_kernels.hpp"

Can anyone tell me what I need to do to resolve this problem?

Was it helpful?

Solution

To solve this problem, check if the directory in which you are installing or any its ancestors don't have a space in their name. I had the same problem and I had one of the parent directories in which I was installing to have a space in it, renamed the directory to remove the space and make ran successfully.

Referred to the following when I faced this error:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top