Where is OpenCV installed?
I have followed this guide to install OpenCV 2.4.8
OpenCV documentation says that I should find OpencV usr/local/include/opencv/ yet I find nothing.
Can someone tell me where to find the installed OpenCV files?
EDIT I'm not sure why the script installed OpenCV 2.4.8 instead of 2.4.9.
But I just found the files here here /usr/include/opencv and /usr/include/opencv2
I am not sure how that works but it does.
3 Answers
OpenCV is installed via checkinstall, have a look at the installer script.
Therefore you can check the installed files via
dpkg -L opencv-<version>Eg:
dpkg -L opencv-2.4.8If you have installed OpenCV via another script as you commented, open the script, find the line
make installand replace with
sudo checkinstallAfter that install checkinstall via
sudo apt-get install checkinstallNow start the installer script again and check the installed files with
dpkg -L opencvThe installer script does exactly the same as before, but now it creates and installs a deb package.
1Currently OpenCV 2.4 is provided via
sudo apt-get install libopencv(if packages were not resolved try: libopencv* or opencv*)
Using package distribution from the Ubuntu repository may require you to update your indexes and packages (to be able to find actual OpenCV version available):
sudo apt-get update
sudo apt-get upgradeAfter apt-get installing OpenCV, the latest available version (2.4.x) will be installed into your default system path:
/usr/local/lib - shared libraries (e.g. /usr/local/lib/libopencv-core2.4.x)/usr/local/include - header files (e.g. /usr/local/include/opencv2)
See this guide (this is not my guide, so I am not aware if it is good or bad)
3Generally I follow this pattern:
cmake ..
make
sudo make installAdd /usr/local/lib to /etc/ld.so.conf.d/opencv.conf
sudo ldconfigThen you can use
pkg-config --libs --cflags opencv to get all include and libs on Ubuntu