Active2 months ago
OpenCV is not supported by Python 3.7 ( not till now). I have currently strated to work with OpenCV. I had Python 3.7 at my machine. I tried to install it using pip, easy install and other installers but they were not working. I visited their page. OpenCV 3.0 was released recently, and you might be thinking of upgrading your code base. OpenCV 2 code will most likely not compile with OpenCV 3 because the new version is not backwardly compatible.
How can I confirm if openCV is properly installed in my computer ? Is there any quick command line for it ? I am on Ubuntu 9.10
Adil2,17099 gold badges3838 silver badges6060 bronze badges
ArkapravoArkapravo2,67299 gold badges3232 silver badges4545 bronze badges
6 Answers
A proper answer to my own question !
pkg-config --modversion opencv
ArkapravoArkapravo2,67299 gold badges3232 silver badges4545 bronze badges
With OpenCV 2.4.x:
You can use 'CV_VERSION' or 'CV_MAJOR_VERSION', 'CV_MINOR_VERSION', 'CV_SUBMINOR_VERSION' from a C/C++ simple program.
Example of 'main.c':
Here is the compilation line:
ssinfodssinfod59822 gold badges88 silver badges2626 bronze badges
Here's an easy way to check. Assuming you installed using the default configuration.
In
/usr/local/lib
you should have the following librariesAnd in
/usr/local/include/opencv
you should have the following header files. I'm assuming that you using the latest version which is 2.0.
SunnySunny1,55022 gold badges1414 silver badges2222 bronze badges
AdamAdam
I found this to be the simplest way:
/usr/bin/opencv_version
DankMasterDanDankMasterDan
You could use
dpkg
.$ dpkg -l | grep libopencv
Or if you use python version:
techkuztechkuz77933 gold badges77 silver badges2626 bronze badges
Not the answer you're looking for? Browse other questions tagged linuxubuntuopencv or ask your own question.
Active4 years, 4 months ago
This question already has an answer here:
- How to check for openCV on Ubuntu 9.10 6 answers
I would like to find out what version of OpenCV is installed on my computer (i am running Ubuntu 10.04). Is there a simple way to check it if ? If not then can i find out the directories where files (samples, etc) are installed ?
I am trying to run some code that i have already tested on another computer with OpenCV 2.3 installed and i get many errors.
Saad
SaadSaad
marked as duplicate by karlphillip, typ1232, Carl Norum, CoolBeans, Adam WagnerFeb 28 '14 at 18:56
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
5 Answers
You can look at the headers or libs installed. pkg-config can tell you where they are:
Alternatively you can write a simple program and print the following defs:
A similar question has been also asked here:
Community♦
crenatecrenate2,81922 gold badges1616 silver badges1212 bronze badges
The other methods here didn't work for me, so here's what does work in Ubuntu 12.04 'precise'.
On Ubuntu and other Debian-derived platforms, dpkg is the typical way to get software package versions. For more recent versions than the one that @Tio refers to, use
If you have the development packages installed, like
nealmcblibopencv-core-dev
, you'll probably have .pc
files and can use pkg-config
:nealmcb
6,47233 gold badges3838 silver badges6868 bronze badges
1) Direct Answer:Try this:
For me, I get:
To see the version, you can try:
giving
2) Better Answer:
'sudo make install' is your enemy, don't do that when you need to compile/update the library often and possibly debug step through it's internal functions. Notice how my config file is in a local build directory, not in /usr/something. You will avoid this confusion in the future, and can maintain several different versions even (debug and release, for example).
Edit: the reason this questions seems to arise often for OpenCV as opposed to other libraries is that it changes rather dramatically and fast between versions, and many of the operations are not so well-defined / well-constrained so you can't just rely on it to be a black-box like you do for something like libpng or libjpeg. Thus, better to not install it at all really, but just compile and link to the build folder.
peter karasevpeter karasev1,87611 gold badge2121 silver badges3737 bronze badges
There is also a flag CV_VERSION which will print out the full version of opencv
KevinKevin
To install this product you can see this tutorial: OpenCV on Ubuntu
There are listed the packages you need. So, with:
and more listed in the url you can find which packages are installed.
With
you can check where are installed
This operative is used for all debian packages.
David Doria4,9601212 gold badges6565 silver badges120120 bronze badges
Tio PepeTio Pepe2,86611 gold badge1313 silver badges2020 bronze badges