Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does opencv install it's libs in ubuntu

I have ubuntu 10 installed. I installed all the opencv packages I could find in the software center. I expect that it installs some .lib files somewhere that I can reference in my project, but I can't find them. Where does it put them?

I want to use eclipse as the ide programming in c++, but I am having problems finding out how to get it setup initially. I am new to programming in eclipse and ubuntu in general so if anyone has a step by step guide I would love to see it.

like image 782
Mr Bell Avatar asked Jun 26 '10 02:06

Mr Bell


People also ask

What is OpenCV where OpenCV libraries are installed?

The libraries of the OpenCV are installed in the folder /usr/lib in the ubuntu and directly under the lib folder present in your OpenCV directory on Windows.

How do I know if OpenCV is installed?

The OpenCV version is included in a special string variable named cv2. __version__ . All we need to do is check this variable and we'll be able to determine our OpenCV version.

Does OpenCV work on Ubuntu?

OpenCV-Python can be installed in Ubuntu in two ways: Install from pre-built binaries available in Ubuntu repositories.


1 Answers

You can find the proper link flags using pkg-config --libs opencv and the proper includes using pkg-config --cflags opencv.

The actual libraries should be installed in /usr/lib and having names such as libhighgui.a or libhighgui.so, but you likely won't have to reference those directly. Just use the output of the above commands in the proper place in Eclipse for setting link flags and include directories. If you really do want to know which libs are OpenCV related, the output of pkg-config --libs opencv will give you the names. For example, one of the outputs of that command is -lhighgui, so we know there should be a file named libhighgui.so in /usr/lib.

I haven't used Eclipse in a while for C or C++, so I can't remember where those options are, but they are around somewhere.

like image 89
Eric Perko Avatar answered Oct 24 '22 09:10

Eric Perko