Month: July 2014

OpenALPR Install for RPI and UDOO and TRE and YUN

This is the way to install on Linux systems like RPI and UDOO Рshould work well.  thanks to Simon Eriksson

1. Remove the Tesseract and OpenCV packages with apt.  It seems the UDOO libs are at OpenCV 2.3.1 which wont work with the openalpr distro on github.

How to remove an apt application

2. Install all dependencies we will need:

sudo apt-get install autoconf automake libtool
sudo apt-get install libpng12-dev
sudo apt-get install libjpeg62-dev
sudo apt-get install libtiff4-dev
sudo apt-get install zlib1g-dev
sudo apt-get install git-core
sudo apt-get install cmake
sudo apt-get install liblog4cplus-dev libcurl3-dev uuid-dev
sudo apt-get install build-essential (you may already have this)

3. Clone the openalpr repo to the /home/pi directory and extract it:

cd /home/ubuntu  ( or /home/pi ) 
git clone

4. Create a directory to hold our libraries and download them all:

cd openalpr
mkdir libraries
cd libraries

(the last step is required because of the way SF does its direct linking, there may be a better way to do this)

5. Extract all the packages ready to compile them:

tar -zxvf tesseract-ocr-3.02.02.tar.gz
tar -zxvf leptonica-1.70.tar.gz

6. Compile Leptonica:

cd leptonica-1.70
make install

7. Compile tesseract:

cd ../tesseract-ocr
sudo make install
sudo ldconfig
export TESSDATA_PREFIX=/home/pi/openalpr/libraries/tesseract-ocr/tessdata

8. Extract the tesseract language data:

cd ..
tar -zxvf tesseract-ocr-3.02.eng.tar.gz

9. Compile opencv:

Try this first – it has a good tutorial on OpenCV

cd opencv-2.4.8
mkdir release
cd release
sudo make install

10. Update the CMakeLists for openalpr:

cd ../../../src
nano CMakeLists.txt
Change line 22 and 23 to:
SET(OpenCV_DIR "/usr/local/lib")
SET(Tesseract_DIR "/home/pi/openalpr/libraries/tesseract-ocr")

11. Compile openalpr:

cmake ./

That should then allow you to run as per the instructions on openalpr