I am a newbie to OpenCV and I am trying to use it with DevC++. Although I am aware I could use Visual Studio for the same , I would still like to use DevC++.
The OpenCV Wiki-how seems obsolete with this information. Can you please tell me the steps with which I can modify the Compiler Options in DevCpp so that I may kick-off with OpenCV.
Any help is highly appreciated ...
Also, OpenCV wiki directs me to paste the following code in the Compiler Options ,
-L"C:\Program Files\OpenCV\lib" -lcxcore -lcv -lcvaux -lhighgui -lml -lcvcam
Sadly , I did not find the lib folder in my OpenCV directory..
Related
I'm using opencv as OpenCV bindings for rust and I'm trying to implement an EigenFaceRecogniser system. On docs.rs, the opencv::face module is listed inside the opencv crate. However, when I build my code, I get the error:
could not find face in opencv
I'm not really sure what's causing this as the face module is clearly listed in the documentation but for some reason I cannot use it. If anybody who has used these bindings before or knows anything about what could be going wrong could help, it would be appreciated.
I'm using OpenCV version 4.5.1.
The solution was to enable the contrib feature for the opencv package.
While I was writing the above question, I stumbled across this post asking about OpenCV having no face module in python. The solution to that question was to install the opencv-contrib-python package so I tried enabling the contrib feature in the opencv crate and it compiled. I thought I'd post this question anyway just in case somebody else was having this issue.
I am trying to use codeblocks to compile the code available here
The thing is every time I try to build and run, I run into the following error:
|/.../head_pose_estimation/opencv2/core/core.hpp|48|fatal error: opencv2/core.hpp: No such file or directory
Does anyone know how I can fix this? Thank you!
You do not have the pre-built (compiled) version of OpenCV, what you currently have are the source files. If you want to do something special with OpenCV (Target/GPU SUpport etc) then you will need to build the framework using an appropriate guide.
If however you simply want to use OpenCV in the most common way then download the pre-built libraries from the OpenCV.org website.
NOTE:
If you are using OpenCV with MinGW compiler, I do not remember if the pre-built is actually pre-built for MinGW. (I dont think they do) In this case you will HAVE to built the libraries. You can find a guide here
I would like to use OpenCV with CodeBlocks. But I don't know to configure CodeBlocks about "Project build options". I need to precise where are the headers, and functions of openCV.
Firstly I've tried to follow this tutorial : http://kevinhughes.ca/tutorials/opencv-install-on-windows-with-codeblocks-and-mingw/ But I had some problems in the step 4 with the configuration of makefiles. In fact, I am not very sure that I need to use cmake in order to read opencv functions.
Could you help me to configure build options ? I think I need to add "C:\opencv\build\include" about compiler on Search Directories, and about linker, what should I add ?
How add the librairy on CodeBlocks ?
Thank you
In fact CMakeLists.txt is present here : ..\opencv\sources\CMakeLists.txt
I thought CMake would have searched. Then, I use correctly Cmake and he has builded OpenCV. I don't use cygwin, I use the shell of windows. So, after that, I've tried to build the exemple of opencv code in this tutorial, and it works !
Now, when I try to build a project already coded, I don't succeed. In fact, it's a code made by an other person, it use OpenCV and C++. And there is also Java code for Android. But I would like to build and execute only C++ code.
I chose the same settings for OpenCV, but how could I know what I should add in "compiler" and "linker" section ?
Thank you for your help.
Try to change your source directory to C:\opencv\sources and see if that works.
I need some help converting a cpp file to a mex file.
I get the error below:
fatal error: opencv2/core/core.hpp: No such file or directory
Compilation terminated
The cpp file is using opencv header files. I'm not sure how to link Matlab with opencv in Ubuntu. I saw this link
http://xanthippi.ceid.upatras.gr/people/evangelidis/matlab_opencv/
but its for Windows and I'm not sure where Ubuntu stores opencv. There are a couple places I found opencv folders
usr/local/include/opencv and
usr/local/include/opencv2 and
usr/local/share/OpenCv
Tried these with OCVROOT but got 'Error: Unexpected Matlab Operator'. Not sure what I'm doing wrong here. Any help would be much appreciated.
Thank you!
Mex needs to be told where the OpenCV header files are. You can either fix it in ~/.matlab/R2013a/mexopts.sh or just put a -I argument on the mex command line. You will find the answer to How to link during Matlab's MEX compilation helpful.
You will have to sort out which of those OpenCV versions you want to use. Might be best to install you own so you know what you are dealing with.
'Error: Unexpected Matlab Operator' would be cause by an error in your matlab code.
matlab_opencv should work fine on Linux, the only windows specific thing about it the instructions, as far as I know.
unless you have a custom mexopts.sh, I don't think setting OCVROOT will hve any affect on Matlab.
Hello everyone;
i had opencv 2.2 on my vs2010, and i wanted to update so i went to opencv site and:
i've downloaded OpenCV for Windows (ver 2.4.6)
i've extracted it to c:\opencv2.4
i've set the Environment Variable as doc said here: http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html#windowssetpathandenviromentvariable
( i didnt know what is "PATH EDITOR" so i've just changed Environment variables)
i made property sprite sheets as opencv doc said here: http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to
5.but Doc Was Old, and there was no "include" folder in OpenCV2.4/opencv/build/x64/vc10 so I did set include Directory to OpenCV2.4/opencv/build/include in My property sprite sheet.
everything seems true and VS detect include libraries But
VS2010 throw following error when i want to Build the solution:
1>LINK : fatal error LNK1104: cannot open file 'opencv_core231d.lib'
Strange thing is there is no "opencv_core231d.lib" File in c:\opencv2.4 at all!!!
:(
what is the problem?
This is a Linker error, so make sure you are trying to link the correct libraries.
I would suggest to use CMake, which definitely simplifies configuring projects, specially those having dependencies like OpenCV (you can take a look to the OpenCV documentation, or any blog explaining the steps: http://marcosnietoblog.wordpress.com/2011/11/19/opencv-for-windows-easy-installation-using-cmake/ )
By the way, I use to have several versions of opencv on the same folder:
C:\OpenCV\opencv2.4.3
C:\OpenCV\opencv2.4.6
...
So I can easily switch within CMake setting the OpenCV_DIR.
opencv_core231d.lib is a debug version, all the *d.lib and *d.dll files in openCV are with debug symbols.
It is likely that the pre-built release you downloaded doesn't contain debug ones.
either download te source and build both debug and release. Or, if you don't care how opencv works internally, just change the linker flags to use the same lib names with the d
edit. or of course if you donwloaded opencv 2.4.6 the file would be opencv_core246d.lib