Ask Your Question
0

opencv/cv.h not found

asked 2020-01-23 04:02:27 -0600

JordiGC gravatar image

updated 2020-01-23 04:15:14 -0600

Hello,

I am trying to build the project of ORB_SLAM2 from this repository.

I have installed all the required dependencies that are mentioned in that repository. However, when I run

./build.sh

I get this error:

/<path_to_folder>/ORB_SLAM2/include/ORBextractor.h:26:23: fatal error: opencv/cv.h: No such file or directory

I have installed opencv4.2.0 from source in a docker image and I want to build the mentioned project in a docker container. I have been looking around how I could get the cv.h file, but I didn't find anything and that's why I am making this post.

This is the Dockerfile I used to create the docker image with opencv4.2 and cuda 10.2

Thank you very much,

Jordi

edit retag flag offensive close merge delete

Comments

berak gravatar imageberak ( 2020-01-23 05:15:25 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2020-01-23 05:10:22 -0600

berak gravatar image

opencv 4 does no more install the deprecated (1.0) c-api headers.

you can either patch the ORBExtractor.h and use

#include <opencv2/opencv.hpp>

(luckily it's only one case, all others were changed already)

if you can't, you'll have to use opencv3 instead.

edit flag offensive delete link more

Comments

Okay! I will install the latest version of OpenCv3. (3.4.9?)

Thank you!

JordiGC gravatar imageJordiGC ( 2020-01-23 05:15:51 -0600 )edit

why not fork the ORBSLAM repo, fix it, and use that instead ?

(editing the file from a webbrowser will do that for you !)

berak gravatar imageberak ( 2020-01-23 05:17:12 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-01-23 04:02:27 -0600

Seen: 22,086 times

Last updated: Jan 23 '20