Quantcast
Channel: ANDOL » opencv linux
Viewing all articles
Browse latest Browse all 22

Installing openCV in Ubuntu with pandaboard part 5 – running openCV 2.3.1 examples

$
0
0

Screenshot-root@hud-desktop: ~-Downloads-OpenCV-2.3.1

The last tutorial about installing opencv in ubuntu with pandaboard 4 – compiling the opencv 2.3.1 did not complete the final compile steps, this post aims to complete that.

Continue the compiling of openCV 2.3.1

I assume you have finished the openCV compiling using cmake ., make, and make install commands in the terminal. Bear in my mind there is one thing I need to remind – be aware of the system date and time, as I left that incorrect and made some unnecessary compiling mistakes.

Screenshot-root@hud-desktop: ~-Downloads-OpenCV-2.3.1-1

The system configurations

After the ‘make install’ commands was executed, the system configurations needed to be set up.

1. use the command below to set the opencv’s lib links in opencv.conf file.

sudo gedit /etc/ld.so.conf.d/opencv.conf

adding the following link to the end of the file: /usr/local/lib

Screenshot-opencv.conf [Read-Only] (-etc-ld.so.conf.d) - gedit

2. need to load the configuration file by using

sudo ldconfig

3. open another file and add the configuration file path, adding the highlighted contents as in the below picture.

sudo gedit /etc/bash.bashrc

Screenshot-bash.bashrc (-etc) - gedit

4. that’s done! Let’s launch an example to have a look if it works.

Running the example

1. make sure the build-essential is installed for opencv programme compiling, if not, using this:

sudo apt-get install build-essential

2. open the terminal, and go to the place holding the sample files, e.g. opencv-2.3.1/samples/c

3. change the target file mod, if you receive permission errors:

chmod +x contours.c

4. get the file compiled ready:

gcc -Wall -W -Werror contours.c -o contours

this command invokes the GNU C compiler to compile the file contours.c and make it an executable file called ‘contours’.

5. run the executable file contours:

./contours

dang-dang….. here it is…

Screenshot - compile operncv samples


Viewing all articles
Browse latest Browse all 22

Trending Articles