I cannot compile gpd in Ubuntu 14.04, I compiled it before but no luck this time. When I tried to compile, I keep getting this error:
In file included from /home/tawfiq/catkin_ws/src/gpd/src/gpd/caffe_classifier.cpp:1:0:
/home/tawfiq/catkin_ws/src/gpd/src/gpd/../../include/gpd/caffe_classifier.h:41:27: fatal error: caffe/caffe.hpp: No such file or directory
#include "caffe/caffe.hpp"
The following lines are already in caffe_classifier.h file:
// Caffe
#include "caffe/caffe.hpp"
#include "caffe/layers/memory_data_layer.hpp"
#include "caffe/util/io.hpp"
In caffe classifier.cpp file which is inside the gpd folder in my catkin_ws src directory, the following line is included:
#include "../../include/gpd/caffe_classifier.h"
The caffe folder is in home, inside caffe folder, there is include folder, then caffe folder, then caffe.hpp in caffe.
It is working fine in others' computers. I installed cuda 7.5. Then caffe and gpd from this link:
https://github.com/atenpas/gpd
and followed what they said. Cuda and caffe successfully compiled. It is so frustrating, I tried updating the bashrc or putting the absolute path in caffe folder, nothing worked.
Related
I am trying to test out object detection on a video I have but ran into this issue
Demo needs OpenCV for webcam images.
So I changed OPENCV=1 in the Makefile but ran into this error now
./src/image_opencv.cpp:5:10: fatal error: 'opencv2/opencv.hpp' file not found
#include "opencv2/opencv.hpp"
^~~~~~~~~~~~~~~~~~~~
1 error generated.
OpenCV works on my laptop for both Xcode and VSCode so I am not sure why this is happening.
The error was fixed by setting the path to the absolute path of the model weights and model configuration files.
I want to add opencv2/cudaimgproc.hpp module from contrib. I followed the instructions in https://github.com/opencv/opencv_contrib to build opencv contrib. I also cloned opencv master because the instructions said so even though I have opencv 4 installed in Google colab. I still get the same error-
fatal error: opencv2/cudaimgproc.hpp: No such file or directory #include
when I run the cpp code with #include . Please help.
I have built OpenCV with extra modules based on these instractions by providing the path:
C:/opencv/opencv-4.2.0/opencv_contrib-4.2.0/modules
in OPENCV_EXTRA_MODULES_PATH in CMake GUI.
However, when I want to use MultiTracker based on this page I face this error:
Cannot open include file: 'samples_utility.hpp': No such file or directory
This error comes from this line:
#include "samples_utility.hpp"
I know samples_utility.hpp is a file in opencv_contrib-4.2.0\modules\tracking, but why is it not found in the built libraries? Do I have to add it from CMake or should I build OpenCV from scratch?
I am using OpenCV with C++ on Ubuntu 16.01 I have to use SURF.
I have already installed opencv_contrib correctly (i followed this link) but when i try to write the path:
#include "xfeatures2d/xfeatures2d.hpp
in my .hpp program I found this error:
#include "xfeatures2d/xfeatures2d.hpp : No such file or directory
Also i tried to put all the directory but it doesn't work either.
I'm not an expert in opencv so i don't know if I have to change any CmakeList or something.
has anybody any ideas?
Try to include path:
INCLUDEPATH += "C://opencv_contrib-3.2.0/modules/xfeatures2d/include"
in your .pro file.
i am running the python code but every time is showing
line 13,in
import cv2.cv as cv2
importerror: No module named cv
how to slove this problem,
i am using rPi 2 opencv-3.1.0 with python 2.7
If you have compiled opencv from source, link cv2.so from compiled directory to your python system directory (generally it is /usr/local/lib/python2.7/dist-packages/)
If not helpful, setup venv in your project directory and link cv2.so and cv.py from python system directory to your project directory.