This article is old. Please visit my new article revised: Install OpenCV on Ubuntu or Debian.
Hi,Thanks for the tutorial..It was just what i needed to get Opencv installed.Great Job!!!Cheers
it took me a while, but got it running at last, you blog has help me a lot, Thank you
Nice article. Precise & Lucid !Great Work.Thanks.
Simple and clean.Thank you
Great! this is the best tutorial I ever seen about OpenCV.Thanks
at last getting error ... like https://www.dropbox.com/s/1yv0x60xz776qu7/Screenshot%20from%202013-09-12%2000%3A59%3A11.png
It is because you don't apply correctly the step 5: Configure OpenCV.
Very good one...Thanks :-)
Hello, I am having problem with hough transform . can u help? it is giving some error
Hello, very nice manualHowever, in the example part, after ./build_all.sh I get this outputg++: error: tbb: No such file or directoryg++: error: rt: No such file or directoryg++: error: pthread: No such file or directoryg++: error: m: No such file or directoryg++: error: dl: No such file or directoryCan you please inform me about this error?
Hi,Have you solved that error ?,I meet the same problem, can you tell me how to do with it?
Hi I've solved this problem by doing thisFirst locate opencv.pc file, its usually in /usr/lib/../pkg-config/opencv.pcgoto last but one line and it should be like thistbb rt pthread m dlNeed to change this like below-ltbb -lrt -lpthread -lm -ldlNow try compiling it should work finegot this solution from some question in stackoverflow
Thanks for the help, Srinivas.
I am getting the error of which Anonymous is getting up there ^ ?? Thanks in advance.
HiYou guys should download opencv again, and make sure you compile with in the opencv directory i.e step 4
Thanks for the help, Umar.
Thanks!! Big Help!!
thank you!!! literally spent months trying to get it to work
hi all ,my name is hagai,I have run this steps ./facedetect lena.jpg i got this massage Illegal instruction (core dumped)can anyone help?
Thanks for this! saved me some time!
Thanks man... one of the best and easy way to install...i have some doubts related to the subject. Is there any blog of yours related to the opencv and opencv related programs.If it is there can you tell?
do we need any prerequisites before starting with the first step?coz wen i tried the step 2 it showed no such entryplease help me
Thank you so much!!!!!
After I try to execute step 2 (installing the dependencies), I get the following error:Package 'libtbb-dev' has no installation candidateUnable to locate package libfaac-devAre there some other dependencies that I need to install beforehand? Is the order of the dependencies incorrect?
thank you! works perfectly! saved me a lot of time!
Hi, I am having a problem when it comes to step 4 when i execute the command 'make'it gives me this errorLinking CXX executable ../../bin/opencv_perf_gpu/usr/bin/ld: ../../lib/libopencv_highgui.so.2.4.3: don't know how to handle section ` ' [0x 2372]../../lib/libopencv_highgui.so.2.4.3: could not read symbols: File in wrong formatcollect2: ld returned 1 exit statusmake: *** [bin/opencv_perf_gpu] Error 1make: *** [modules/gpu/CMakeFiles/opencv_perf_gpu.dor/all] Error 2make:: *** [all] Error 2i hope that you can help me resolve this problem as I need to rush with the completion of my project and opencv is a very important aspect of it, thanks so much for ur reply
To install OpenCV using the terminal on Ubuntu:$ su -# apt-get update# apt-get install build-essential# apt-get install libavformat-dev# apt-get install x264 v4l-utils ffmpeg# apt-get install libcv2.3 libcvaux2.3 libhighgui2.3 python-opencv opencv-doc libcv-dev libcvaux-dev libhighgui-devhttp://namhuy.net/1205/how-to-install-opencv-on-ubuntu.html
can this be the same for raspbian on raspberry pi too? thanks
thank you ....
while running samples/c file I m getting fatal error of file not found or directory not found can some one solve this problem
Thanks a bunch! I've been trying to install OpenCV on Win8 for the past four months but with no success. Now I'm on Ubuntu 13.10 and this really worked for me!
This comment has been removed by the author.
Thanks, I am also installed Opencv 2.4.8 in Ubuntu 13.10 Its worked......
THANK YOU VERY MUCH
Superb blog....Follow every word as it is and your are done
Thank you so much for your tutorial. This helped me a lot. perfect blog for openCV beginners.
help! I have this message error before passage 5:CMake Error at CMakeLists.txt:62 (include): include could not find load file: cmake/OpenCVUtils.cmakeCMake Error at CMakeLists.txt:64 (ocv_clear_vars): Unknown CMake command "ocv_clear_vars".-- Configuring incomplete, errors occurred!what can I do?
When i try and run step 5, i get a permission denied error. any ideas?
you need to enter sudo before the command, and it will work.
TY for this tutorial, simple, precise and helpful !
I did it! Thanks, Buddy!
Hi, can I delete opencv folder after these steps?I'm using opencv with java, and cmake created both build/bin/opencv-249.jar and build/lib/libopencv_java249.so , but make didn't installed them in usr/local/... , or at least I coulnd't find them.I don't know where to copy theese files, nor if I have to copy more files in order to safe delete originally decompressed opencv directory.Thank you very much.
Great article, better than the official one that's for sure.Cheers
It worked thank u so much.......................... Great........
after i install openCV,can i use IDE such as Eclipse?
Yes you can, I use Eclipse CDT (C++ IDE). If you have eclipse you can add cdt plugin, or you can download Eclipse with CDT. Here are some tutorialshttp://docs.opencv.org/2.4.9/doc/tutorials/introduction/table_of_content_introduction/table_of_content_introduction.html#table-of-content-introduction
sir i want to create a app that uses opencv to play virtual piano through gesture can u help me to do it plz ....sir
Am I missing something? Im getting the following[ 70%] Building CXX object modules/nonfree/CMakeFiles/opencv_perf_nonfree.dir/perf/perf_main.cpp.oIn file included from /home/sello/opencv-2.4.9/modules/nonfree/perf/perf_main.cpp:28:0:/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp: In function ‘void dumpOpenCLDevice()’:/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:88:9: error: ‘PlatformsInfo’ is not a member of ‘cv::ocl’/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:88:32: error: expected ‘;’ before ‘platforms’/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:89:9: error: ‘getOpenCLPlatforms’ is not a member of ‘cv::ocl’/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:89:37: error: ‘platforms’ was not declared in this scope/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:95:19: error: ‘DevicesInfo’ in namespace ‘cv::ocl’ does not name a type/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:96:39: error: ‘devices’ was not declared in this scope/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:98:23: error: ‘DeviceInfo’ in namespace ‘cv::ocl’ does not name a type/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:99:33: error: ‘current_device’ was not declared in this scope/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:99:62: error: ‘CVCL_DEVICE_TYPE_CPU’ was not declared in this scope/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:100:71: error: ‘CVCL_DEVICE_TYPE_GPU’ was not declared in this scopeIn file included from /home/sello/opencv-2.4.9/modules/nonfree/perf/perf_main.cpp:28:0:/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:108:15: error: ‘DeviceInfo’ in namespace ‘cv::ocl’ does not name a type/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:110:9: error: ‘deviceInfo’ was not declared in this scope/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:111:9: error: ‘deviceInfo’ was not declared in this scope/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:113:25: error: ‘deviceInfo’ was not declared in this scope/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:113:50: error: ‘CVCL_DEVICE_TYPE_CPU’ was not declared in this scope/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:114:61: error: ‘CVCL_DEVICE_TYPE_GPU’ was not declared in this scopemake: *** [modules/nonfree/CMakeFiles/opencv_perf_nonfree.dir/perf/perf_main.cpp.o] Error 1make: *** [modules/nonfree/CMakeFiles/opencv_perf_nonfree.dir/all] Error 2make: *** [all] Error 2
Only blog that helped me with easy installation
Hi, thank you for this tutorial, very useful.I also have the problem that the "c" folder in the "samples" folder, is missing! So I can't run build_all.shI have the "cpp" folder and in that is not working as well.Somebody have the solution?Thanks you in advance!Ubuntu 14 / OpenCV 3.0 alpha
I am having the same problem... whats the solution?
Is there a way to run a command line program that will return the number of faces in a picture?I would like to use it in a bash script and as far as I understand "facedetect" only shows you what is possible, it doesn't return boolean values like "there is a face" or "there isn't a face"Thank you!
When building OpenCV, you may want to add the job "-j" flag to the make command with the number of physical cores on your machine (i.e.make -j4) to decrease build time.