I've set the opencv environment variable and updated the path but I'm still getting an error when I try to make the opencv aruco library with cmake gui on windows - the error says
"OpenCV required but some headers or libs not found. Please specify OpenCV directory using OpenCV_DIR env. variable"
I've looked at the FindOpenCV.cmake file where the error is coming from, but I can't tell what part is causing an error and was wondering if anyone else has had similar problems or knows how to fix it it would be much appreciated!
#DeirdreMeehan are you getting error as shown in the following image?
If this is the same error you are getting then you are supposed to link openCV directory from your computer to ArUco. That is you add OpenCV path in to value field where the name field is "OpenCV_DIR".
Related
I am new to Ubuntu. I installed OpenCV following http://milq.github.io/install-opencv-ubuntu-debian/. Note that opencv_contrib are not installed. I had an error initially that opencv4.pc file was not found which I corrected by creating a new opencv4.pc in usr/local/lib and making appropriate changes in ~/.bashrc file. Now the error while compiling using c++ file from :
https://cv-tricks.com/installation/opencv-4-1-ubuntu18-04/.
This is the error I got:
.
I tried to locate the missing files in other locations but I was unable to find them. Please help me solve my problem.
I wanted to use the "extra" modules, that come as opencv_contrib from here for other functions of opencv 3.0. I followed the instructions as per the page, for building and compiling the modules, but am stuck with this error
Command:
cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ..
Error:
<Skipping the common Cmake statements and going straight to the error>
CMake Error at opencv_contrib/modules/adas/tools/fcw_train/CMakeLists.txt:16 (ocv_include_modules_recurse):
Unknown CMake command "ocv_include_modules_recurse".
-- Configuring incomplete, errors occurred!
I checked the CMakeLists.txt as mentioned in the path and there were other lines of code that had ocv_xxx , thus it was not a rename issue (I thought they misspelt opencv).
This is my folder structure:
Opencv
- build
- opencv_contrib
This is to verify if my CMake command was correct, as I had posted above.
Can you please tell me how to rectify this error?
UPDATE 1
As per a suggestion, I tried,by putting the opencv_contrib folder outside the opencv folder structure. The new structure was like this
-Opencv
- build
-opencv_contrib
and my new command was
cmake -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules ..
the error is still the same.
Fixed it, thanks to this question. From that question, I understood that the value of the argument should be correct, to turn on the build or something like that. So I changed my command from
cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ..
to
cmake -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib/modules .
Plain and simple, without hierarchy information and it worked. Cheers.
I have been trying to work with the flandmark code for facial detection. in order to compile the libraries, I need to run CMAKE.gui.exe. However I keep getting the same error and no one seems to have an idea how to get around it. I would really appreciate if please someone could help.
Error:
Cmake Warning at /OpenCV2.3/cmake/OpenCVConfig.cmake:153(message):
Found OpenCV 2.4.3 Windows Super Pack but it has not binaries compatible with your configuration.
You should manually point Cmake variable OpenCV_DIR to your build of OpenCV library.
Call Stack(most recent call first):
CMakeLists.txt:2(find_package)
CMake Error at CMakeLists.txt:2(find_package):
Found package configuration file:
/OpenCV2.3/cmake/OpenCVConfig.cmake
but it set OPENCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND
Just delete CMake cache.
I've had more or less the same problem, posted & answered a question myself.
Check it at https://stackoverflow.com/a/36622706/3292304 for the whole problem if you want. I hope this will help.
I would suggest you take a look at this post
It happened in my case since I had already installed another version of OpenCV.
I hope it helps
Something weird is going on with the cmake configuration files.
For me the problem was solved by simply setting OPENCV_FOUND to TRUE and OpenCV_FOUND to TRUE.
Also I had to set OpenCV_DIR to /usr/local/share/OpenCV.
I want to use OpenCV framework in my project. But while building opencv from source , i am getting errors. I am using this link to install opencv
I am getting this error in terminal of which i am attaching images.
i also used opencv2.framework which is already built and add this in my project but its showing linker error.
Please help me to use openCV.
Thanks in advance. . . .
Here's how to fix it...
Google your error: "xcrun error: could not stat active Xcode path"
Click on the first link and go to
xcrun: Error: could not stat active Xcode path '/Volumes/Xcode/Xcode45-DP1.app/Contents/Developer'. (No such file or directory)
if still unclear try the next couple of links
change xcrun developer path
Resolved: Error “Could not stat active Xcode path”
When Google and SO fail you, come back here explaining what you have tried (and post your text errors as text not image!)
As regards your linker error (what linker error? post it!) my answer here might help
How to resolve iOS Link errors with OpenCV
I am working on a harr detecttion project. I want to generate the exe files using the .cpp files that come with Opencv. I am using CMake for it. When I try to do that I am getting an error like this. Don`t know how to solve it.
CMake Error at CMakeLists.txt:7 (ocv_check_dependencies):
Unknown CMake command "ocv_check_dependencies".
Configuring incomplete, errors occurred!
Source link: C:/opencv/apps/haartraining
Destination link: D:/build
Please help me.
I was working on some image processing that involves Haar detection. And i was having a hard time trying to configure with Cmake at first but i finally found manual configuration tutorial with out using Cmake or else. It has helped me a lot and you can get it here. I hope it will work perfect as it worked for me too. Click here -> http://www.anlak.com/using-opencv-2-3-1-with-visual-studio-2010-tutorial/. The tutorial uses open CV 2.3.1 but it will work perfect for recent versions too with the need for Cmake ore else.If you more questions, hit me up and i will explain.Good luck!
It looks like You need to compile the whole library with build examples option enabled (if You are using windows then I bet You use graphic cmake interface, so it shouldn't be a problem), and then You will find the .exe in bin directory,
or You would need to include OpenCVModule.cmake file found in cmake catalogue to CMake file You are trying to use for the build.
I didn't test the second option myself, but it looks like CMake file You are trying to use does not load all macros needed for it to run, but macros are loaded when the root library CMake file is used.