Close

Installing OpenCv on a Raspberry Pi - The Easy Way

A project log for Hacking the way to growing food

Using Technology And A Hackers Mindset To Grow Food. Last Updated [16/01/2021]

michael-ratcliffeMichael Ratcliffe 08/16/2015 at 15:570 Comments

For This Project we will be using OpenCv on the Raspberry Pi quite a lot.

It it crazy Just How much miss information there is about opencv and the Raspberry pi

many tutorials will guide you thru a installation process that takes 12 hours+

and has library linked complexly.

Opencv 2.4.1 [CV2] is available in the default Rasbian Repository.

To Install on Rasbian, type the following into the command terminal:

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install libcv-dev

sudo apt-get install python-opencv

sudo apt-get install libopencv-dev

sudo apt-get install libcv2.3

sudo apt-get install opencv-doc

Yet that is it, OpenCv is installed.

How To use:

>Open the File manager and go to your documents

>Right click>CreatNew>Empty File

>Add the line [#!/usr/bin/python] To the top of the file

>Save it as <FileName>.py

>Right Click on the File >Properties>Permisions and select everone> OK

>Doubble click on the file and execute in terminal

Hints:

>Remember it is a python based install of openCV 2

>Execute the python script as root if you want acess to the GPIO pins

>If the script doesnt work, Cd / into the directory and run python <Filename.py>

I will be including a test scrip in my next blog post to check that your installation will work with the raspbery Camera module and a USB camera.

Discussions