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.
解决方案
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: