Ask Your Question
0

A Ubuntu step by step installation of OpenCV for dummies?

asked 2015-03-10 10:31:28 -0500

I mean a full dummy, I have already downloaded the latest version( OpenCV 3.0.0 Beta). I have read many forms but seeing as I have only been using Ubuntu for about two weeks I am unable to install correctly. I've been a windows user all my life and just made the switch, but I need opencv 3.0.0 for a project I'm working on. Forgive me in advance if this post seem trivial.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2015-03-10 10:41:50 -0500

thdrksdfthmn gravatar image

You can just search on Google and see the first page in the result.

Here are the steps to follow for installing OpenCV on Ubuntu.

edit flag offensive delete link more
1

answered 2015-03-10 10:56:00 -0500

Potato gravatar image

There are many ways you can do this. You can either unpack the beta version and install it from source. Or clone the most updated version of 3.0.0 beta from the github page. The latter is recommended. Take a look at this link for more details --> http://docs.opencv.org/trunk/doc/tuto...

Steps.

  1. You need to get the required dependencies first (i.e. Files that are needed for OpenCV to run). Run the following commands.

    sudo apt-get install build-essential

sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev

sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

  1. Create a directory for where you want to place these files. eg: mkdir opencv3 and enter that directory cd opencv3/

  2. Get the latest version from github using the following commands. git clone https://github.com/Itseez/opencv.git and git clone https://github.com/Itseez/opencv_contrib.git. Note that opencv_contrib contains additional functionality via it's own modules.

  3. Enter the cloned openCV folder and make a directory called build (mkdir build) and enter that directory (cd build) then run the following command. --> cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules .. where the install prefix is where you want files to be installed and the opencv_extra_modules_path provides the path to where the opencv_contrib functionality is located. You can add more options based on your needs. Take a look at the link for that.

  4. Run make, then run sudo make install. This should install OpenCV 3.0.0 beta.

edit flag offensive delete link more

Comments

in the 4th step, when I am doing "make", following error message popped up:

[ 63%] Generating precomp.hpp [ 63%] Generating precomp.hpp.gch/opencv_bioinspired_Release.gch /home/krish/opencv3/opencv/build/modules/bioinspired/precomp.hpp:55:44: fatal error: opencv2/ocl/private/util.hpp: No such file or directory compilation terminated. make[2]: * [modules/bioinspired/precomp.hpp.gch/opencv_bioinspired_Release.gch] Error 1 make[1]: [modules/bioinspired/CMakeFiles/pch_Generate_opencv_bioinspired.dir/all] Error 2 make: ** [all] Error 2

pls help me out

saikrishnagv gravatar imagesaikrishnagv ( 2015-06-24 05:30:09 -0500 )edit

You might have to disable OpenCL in your CMAKE statement. cmake ... -D WITH_OPENCL=OFF

Potato gravatar imagePotato ( 2015-06-24 11:51:28 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-03-10 10:31:28 -0500

Seen: 1,638 times

Last updated: Mar 10 '15