Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can't find opencv.hpp, however it is not installed in /usr/include/

Context: I am a new Ubuntu 16.04 user and I am trying to get OpenCV running on my system. I had some problems downloading and installing OpenCV with CUDA installed, so I used the solution as proposed by daveselinger in his last post here: https://github.com/opencv/opencv/issues/6677.
This left me with OpenCV installed at: ~/Documents/my\ folder/opencv/. Notably, this also includes: ~/Documents/my\ folder/opencv/include/opencv2/opencv.hpp.
Now as far as I have been able to figure out, there should (also?) be a copy at: /usr/include/opencv2/opencv.hpp. At least, if I have interpreted the answer here correctly: http://www.answers.opencv.org/question/14712/opencvhpp-not-in-opencv2/. Now the issue is that there is no folder "openCV2" (nor a folder "openCV") in /usr/include/. This probably is the reason why "#include <opencv2 opencv.hpp="">" leads to "fatal error: opencv2/opencv.hpp: No such file or directory". Does anyone know how to solve this error? Normally I would try several times of reinstalling, but installing openCV took around 4 hours, so I'd like to take a more structured approach if possible.

Can't find opencv.hpp, however it is not installed in /usr/include/

Context: I am a new Ubuntu 16.04 user and I am trying to get OpenCV running on my system. I had some problems downloading and installing OpenCV with CUDA installed, so I used the solution as proposed by daveselinger in his last post here: https://github.com/opencv/opencv/issues/6677.
This left me with OpenCV installed at: ~/Documents/my\ folder/opencv/. folder/opencv/. Notably, this also includes: ~/Documents/my\ folder/opencv/include/opencv2/opencv.hpp. folder/opencv/include/opencv2/opencv.hpp.
Now as far as I have been able to figure out, there should (also?) be a copy at: /usr/include/opencv2/opencv.hpp. /usr/include/opencv2/opencv.hpp. At least, if I have interpreted the answer here correctly: http://www.answers.opencv.org/question/14712/opencvhpp-not-in-opencv2/. Now the issue is that there is no folder "openCV2" (nor a folder "openCV") in /usr/include/. /usr/include/. This probably is the reason why "#include <opencv2 opencv.hpp="">" #include <opencv2/opencv.hpp> leads to "fatal error: opencv2/opencv.hpp: No such file or directory". Does anyone know how to solve this error? Normally I would try several times of reinstalling, but installing openCV took around 4 hours, so I'd like to take a more structured approach if possible.

Can't find opencv.hpp, however it is not installed in /usr/include/

Context: I am a new Ubuntu 16.04 user and I am trying to get OpenCV running on my system. I had some problems downloading and installing OpenCV with CUDA installed, so I used the solution as proposed by daveselinger in his last post here: https://github.com/opencv/opencv/issues/6677.
This left me with OpenCV installed at: ~/Documents/my\ folder/opencv/. Notably, this also includes: ~/Documents/my\ folder/opencv/include/opencv2/opencv.hpp.
Now as far as I have been able to figure out, there should (also?) be a copy at: /usr/include/opencv2/opencv.hpp. At least, if I have interpreted the answer here correctly: http://www.answers.opencv.org/question/14712/opencvhpp-not-in-opencv2/. Now the issue is that there is no folder "openCV2" (nor a folder "openCV") in /usr/include/. This probably is the reason why #include <opencv2/opencv.hpp> leads to "fatal error: opencv2/opencv.hpp: No such file or directory". Does anyone know how to solve this error? Normally I would try several times of reinstalling, but installing openCV took around 4 hours, so I'd like to take a more structured approach if possible.

Edit: the solution was that I failed to use sudo make install in the installation of openCV. This caused the files to fail to be copied to /usr/local/include. That in turn made them impossible to find for programs trying to use those files.