Hi, I am trying to use GitHub - vrabaud/gPb: gPb implementation for OpenCV with opencv2 on ubuntu. But I keep getting exceptions stating that I am missing the opencv2 import:
/home/blazeic/gPb/grouping/source/buildW/ic.hh:22:10: fatal error: opencv2/core/core.hpp: No such file or directory
22 | #include <opencv2/core/core.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
And this is my opencv configuration:
pkg-config --cflags --libs opencv
-L/home/blazeic/opencv_build/lib -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_viz -llibopencv_core -lopencv_core
My opencv version is 4.5.1-dev
I don’t know how to find the make system but when I use -h it’s “This program built for x86_64-pc-linux-gnu”
I tried the include like you suggested but nothing changed, I also looked at the include files and it looks empty
I cn only suggest to dig deeper. The file opencv2/core/core.hpp clearly exists in /usr/local/include/opencv4. So if the makefile is correctly configured, it shouldn’t give an include error.
I also day this because the OpenCV include path was changed from OpenCV3 to OpenCV4 from /usr/local/include to /usr/local/include/opencv4
Maybe try recompiling OpenCV? I used this tutorial to get it working for me on my GPU. This is for Python, but I would think at least the build instructions are the same. Ubuntu can be really picky about Nvidia drivers as well.