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.
After installation, it is recommended that you can check the version of OpenCV that Python is using: import cv2 print cv2. __version__ # Should print 3.0. 0-rc1 or newer.
OpenCV libraries are installed as in . a(static library) or . so(dynamic library) format. You can find OpenCV2 (i.e. C++ version) libraries (e.g. libopencv_core.so,libopencv_highgui.so etc) at /usr/local/lib .
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
dpkg -l | grep libopencv
If you have the development packages installed, like libopencv-core-dev
, you'll probably have .pc
files and can use pkg-config
:
pkg-config --modversion opencv
You can look at the headers or libs installed. pkg-config can tell you where they are:
pkg-config --cflags opencv
pkg-config --libs opencv
Alternatively you can write a simple program and print the following defs:
CV_MAJOR_VERSION
CV_MINOR_VERSION
A similar question has been also asked here:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With