Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check for openCV on Ubuntu 9.10

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

like image 256
Arkapravo Avatar asked Mar 11 '10 04:03

Arkapravo


People also ask

Where is OpenCV installed Ubuntu?

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 .


2 Answers

A proper answer to my own question !

pkg-config --modversion opencv

like image 80
Arkapravo Avatar answered Oct 22 '22 17:10

Arkapravo


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':

#include <stdio.h> #include <cv.h>  int main(void) {     printf("%s\r\n", CV_VERSION);     printf("%u.%u.%u\r\n", CV_MAJOR_VERSION, CV_MINOR_VERSION, CV_SUBMINOR_VERSION); } 

Here is the compilation line:

g++ `pkg-config --cflags opencv` main.c `pkg-config --libs opencv` -o main 
like image 39
ssinfod Avatar answered Oct 22 '22 17:10

ssinfod