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

Cmake: OpenCV > 2.4.3 not found. , but via pip: opencv-contrib-python (3.4.0.12) is installed #527

Open
bubbelMCU opened this issue Feb 25, 2018 · 10 comments

Comments

@bubbelMCU
Copy link

bubbelMCU commented Feb 25, 2018

hello, not sure what shall I do?
cmake cannot find opencv, which I installed for python2 and 3 via pip and the version is:
opencv-contrib-python (3.4.0.12)

How to set path to opencv pip package correctly?
Or do I need to recompile opencv from source?

Error message by Cmake:

-- Using flag -std=c++11.
CMake Error at CMakeLists.txt:35 (message):
  OpenCV > 2.4.3 not found.
@douxiao
Copy link

douxiao commented Jun 14, 2018

https://blog.csdn.net/gxsheen/article/details/79090454

@ishanivyas
Copy link

Having same issue with OpenCV > 2.4.3 not found.

@LongruiDong
Copy link

@Brian-ZhenLiu
Copy link

@Wingmore
Copy link

Could someone provide/explain the steps from the blog please? I don't understand and I've searched every other answer on the web

@Wingmore
Copy link

nvm, I got it - had to add my openCV directory to Thirdparty/DBoW2/CMakeLists.txt

i.e. had to find my openCV directory. For me it was in /usr/local/include/opencv4.
Then I just added SET (OpenCV_DIR /usr/local/include/opencv4) to my CMakeLists.txt file.

@ratomatrix
Copy link

Same error message for me in January 2021.
In my case, the issue was that I just installed the latest OpenCV (as of January 2021 - OpenCV 4.5.1), but versions above OpenCV 3 are not accepted. So I downloaded and installed the latest version starting with 3 (3.4.13), and this error message has gone.
(Unfortunately, I personally have other error messages now :) But at least this one seems to be solved.)

@Emilianocb
Copy link

nvm, I got it - had to add my openCV directory to Thirdparty/DBoW2/CMakeLists.txt

i.e. had to find my openCV directory. For me it was in /usr/local/include/opencv4. Then I just added SET (OpenCV_DIR /usr/local/include/opencv4) to my CMakeLists.txt file.

i can't added 'SET (OpenCV_DIR /usr/local/include/opencv4)' because the file are only to read, I tried with chmod but it's the same

@DANIELHARDLY
Copy link

DANIELHARDLY commented Nov 23, 2022

nvm, I got it - had to add my openCV directory to Thirdparty/DBoW2/CMakeLists.txt
i.e. had to find my openCV directory. For me it was in /usr/local/include/opencv4. Then I just added SET (OpenCV_DIR /usr/local/include/opencv4) to my CMakeLists.txt file.

i can't added 'SET (OpenCV_DIR /usr/local/include/opencv4)' because the file are only to read, I tried with chmod but it's the same

use sudo to edit CMakeLists.txt
if you are using vim type sudo vim CMakeLists.txt

@mgrallos
Copy link

mgrallos commented Mar 4, 2023

SET (OpenCV_DIR /usr/local/include/opencv4)
where do I put it? I did already add it but same error occurs

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

10 participants