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's linked complexly.
Opencv 2.4.1 [CV2] is available in the default Rasbian Reposttory.
To Install on Rasbian, type the following into the command terminal:
Type Into 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 |
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>Permissions and select everyone> OK
>Double 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 access to the GPIO pins
>If the script doesnt work, Cd / into the directory and run python <Filename.py>
Useful Links:
Adaptive Threshold: http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_imgproc/py_thresholding/py_thresholding.html
Other Threshold