Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: opencv/cv.h: No such file or directory #include <opencv/cv.h> #782

Open
Tengyun-Mo opened this issue Jul 4, 2019 · 5 comments

Comments

@Tengyun-Mo
Copy link

I have installed opencv4.1.1 on my PC,the opencv4.1.1 don't include the header file named cv.h.so which header file should I replace opencv/cv.h?

@Tengyun-Mo
Copy link
Author

/home/ubuntu/Downloads/ORB_SLAM2/include/ORBextractor.h:26:10: fatal error: opencv/cv.h: No such file or directory #include <opencv/cv.h> ^~~~~~~~~~~~~ compilation terminated.

@Windfisch
Copy link

I think I fixed this in #790 or https://github.com/Windfisch/ORB_SLAM2
At least it works for me under Arch Linux with OpenCV 4.1.0.

@ckchng
Copy link

ckchng commented Nov 5, 2019

Hi @Windfisch Thank you so much for your effort. By the way I'm having problem in finding 'opencv2/imgcodecs/legacy/constancts_c.h' while compiling it with OpenCV 4.0.0. Do you have any idea on top of your head why this might be a problem?

@ckchng
Copy link

ckchng commented Nov 5, 2019

I managed to 'solve' it by

  1. removing that inclusion (#include "opencv2/imgcodecs/legacy/constancts_c.h").
  2. and Error while building ORB_SLAM2 #451 (comment)

Thanks.

@Windfisch
Copy link

Hi @ckchng, it appears to me that the constants have been moved from modules/imgcodecs/include/opencv2/imgcodecs.hpp to modules/imgcodecs/include/opencv2/imgcodecs/legacy/constants_c.h on 2018-11-17, and opencv 4.0.0 has been released one day later. So it should™ work for you.
Are you sure that you're using OpenCV 4.0.0, and not a release-candidate (e.g. 4.0.0-rc1)?
Which OS/Distro in which version do you use, and where did you get OpenCV from? It it possible that cmake decided not to use your OpenCV4 installation, but an old OpenCV3 installation that might be still flying around somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants