updated tutorial on how to install openALPR on a raspberry pi a/o 20160102

13,182 views
Skip to first unread message

malcolm stanley

unread,
Jan 2, 2016, 12:22:32 PM1/2/16
to OpenALPR
Hey everyone
I got a new Pi for xmas (well, it was a drone that magically turned into a PI) 
I started playing with openALPR installs and noticed the tutorials were a bit out of date and whatever,
so I went through it and beat it up a bit and came up with a non-optimized installation that uses current versions of packages and seems to work.

This can be obviously improved upon, but I hope it makes it a little easier for noobs like me who are just looking for a recently tested tutorial that requires a minimum of googling around.

a copy of this is posted as a gist here:
https://gist.github.com/amstanley/9da7febc9a3e3c2228ee

This is not optimized for space or whatever, but does work.

how to read:

this is a heading, as denoted by the:
on a line where you see some text -> some more text
this is the text in the original tutorial -> this is what you should type instead
note: this is a note: don't type this.

installed and tested on a raspberry pi 2 model B 1GB using raspbian installed via noobs on a 32 GB memory card.
note that an 8GB card will fill before this tutorial ends, so you will need a card bigger than that.
Not tested on a 16GB card so no idea if that will work or not.

installation steps: 

Install Dependencies:
sudo apt-get install autoconf automake libtool
sudo apt-get install libpng12-dev
sudo apt-get install libjpeg62-dev -> sudo apt-get install libjpeg62-turbo-dev
sudo apt-get install libtiff4-dev -> sudo apt-get install libtiff5-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 libcurl4-openssl-dev liblog4cplus-1.0-4 liblog4cplus-dev uuid-dev

Clone openalpr:
cd /home/ubuntu  ( or /home/pi ) 

Create a directory and download libraries:
cd openalpr
mkdir libraries
cd libraries

using browser, nav to https://github.com/tesseract-ocr/tesseract and 'download zip' then
mv /home/pi/Downloads/tesseract-master.zip .

using browser navigate to https://github.com/tesseract-ocr/tessdata and 'download zip' then
mv /home/pi/Downloads/tessdata-master.zip .


don't do this:
mv opencv-2.4.8.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fopencvlibrary%2Ffiles%2Fopencv-unix%2F2.4.8%2Fopencv-2.4.8.zip%2Fdownload opencv-2.4.8.zip

instead do this:

extract the packages:
tar -zxvf tesseract-ocr-3.02.02.tar.gz -> unzip tesseract-master.zip
tar -zxvf leptonica-1.70.tar.gz -> tar -zxvf leptonica-1.71.tar.gz
unzip opencv-2.4.8.zip -> unzip opencv-2.4.11.zip

compile leptonica:
cd leptonica-1.70 -> cd leptonica-1.71
./configure
make
make install -> sudo make install

note generates following message:
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.

compile tesseract:
cd ../tesseract-ocr -> cd ../tesseract-master
./autogen.sh
./configure
make
sudo make install
sudo ldconfig
export TESSDATA_PREFIX=/home/pi/openalpr/libraries/tesseract-ocr/tessdata -> 
export TESSDATA_PREFIX=/home/pi/openalpr/libraries/tessdata-master

after sudo ldconfig you should 'make install LANGS="eng"' to set language preference. Not sure how this makes sense but may try it if I run into trouble. (update: I did not)


extract the tesseract language data:
cd ..
tar -zxvf tesseract-ocr-3.02.eng.tar.gz -> unzip tessdata-master.zip

compile opencv:
cd opencv-2.4.8 -> cd opencv-2.4.11
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make install

update the cmake lists 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")
-> none of this seems required, so skip

Compile openALPR:
cmake ./
make
sudo make install
sudo cp -r /usr/local/lib/* /lib 
note: seems like this last step is just a path issue... surely better way to do this)

alpr -c us ea7the.jpg

result: 
plate0: 10 results
    - EA7THE confidence: 92.4795
    - EA7TBE confidence: 84.0421
    - EA7TRE confidence: 83.1932
    - EA7TE confidence: 82.0527
    - EA7T8E confidence: 81.7845
    - EA7TME confidence: 80.8062
    - EA7THB confidence: 76.6468
    - EA7TH6 confidence: 76.6153
    - EA7TH confidence: 75.2232
    - EA7TBB confidence: 68.2095

alpr -c eu h786poj.jpg


malcolm stanley

unread,
Jan 4, 2016, 12:54:39 AM1/4/16
to OpenALPR
I updated the gist and tested it, seems to work. 
going travel for a week or so, will add mjepg support and daemon installation to this when I can.

Matt

unread,
Jan 7, 2016, 7:56:49 PM1/7/16
to OpenALPR
Very cool.  A lot of folks have had trouble with compiling Raspberry Pi in the past, since it uses the Debian ARM packages (which aren't the same as x64).  Therefore the instructions are a fair bit different. Thanks for documenting this!

load...@yahoo.com

unread,
Jan 11, 2016, 3:46:25 AM1/11/16
to OpenALPR


Dana subota, 2. siječnja 2016. u 18:22:32 UTC+1, korisnik malcolm stanley napisao je:



After almost 2 months of bashing my head I have finally stumbled on this beautiful update of yours
Thank You ! 
I'm a complete noob when it comes to linux/unix systems and old guide was soo confusing ( More like it was outdated ).
Currently trying to make this work on a 16 gigs Raspberry Pi B v1

malcolm stanley

unread,
Jan 11, 2016, 8:08:53 AM1/11/16
to OpenALPR
Matt, one question I had was around the last step:
I tried adding the directory with the compiled software to the path but still got not found errors.
the only solution that seems reliable is to copy  the binaries to /lib.
any idea if there is a better solution to that?

load...@yahoo.com

unread,
Jan 11, 2016, 11:27:11 AM1/11/16
to OpenALPR


Dana subota, 2. siječnja 2016. u 18:22:32 UTC+1, korisnik malcolm stanley napisao je:
Hey Malcom

When I have finished installing tesseract-master and typed in sudo ldconfig
Like nothing happened
Same goes for:  export TESSDATA_PREFIX=/home/pi/openalpr/libraries/tessdata-master
Is this normal?

Some screen shots:

Thanks

malcolm stanley

unread,
Jan 11, 2016, 11:36:02 AM1/11/16
to OpenALPR
that is normal.
keep going.

Matt

unread,
Jan 11, 2016, 8:36:59 PM1/11/16
to OpenALPR
I think the issue is /usr/local/lib isn't in the ld.so path by default.  /lib/ and /usr/lib/ are included by default. So the system has no idea that your libraries are available and can't use them.  You can either change the prefix sent to cmake to be /usr/:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/ ..

Or (worse option) modify the ld.so.conf to include /usr/local/lib/

malcolm stanley

unread,
Jan 11, 2016, 9:04:45 PM1/11/16
to OpenALPR
so specifically, in the gist at https://gist.github.com/amstanley/9da7febc9a3e3c2228ee
on line 71
you would make the change:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local .. -> cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/ ..

Are you sure that will resolve the issue, or does someone need to test that?

Matt

unread,
Jan 12, 2016, 8:27:31 AM1/12/16
to OpenALPR
I think so... but I am never sure about anything without testing :)

load...@yahoo.com

unread,
Jan 13, 2016, 12:16:39 PM1/13/16
to OpenALPR
Hello again

I'm confused with this last step.
Compile openALPR:
cmake ./
make
sudo make install
sudo cp -r /usr/local/lib/* /lib 
note: seems like this last step is just a path issue... surely better way to do this

Do I need to cd in the folder and then cmake ./ or?
From Your replies I got even more confused on what to do :/

Thanks for replying

Malcolm Stanley

unread,
Jan 13, 2016, 2:23:26 PM1/13/16
to load...@yahoo.com, OpenALPR
when you compile openALPR
you need to be in the openALPR directory, which we defined at the beginning of the tutorial as /home/pi/openalpr
so before this step please cd /home/pi/openalpr and you should be good:

Compile openALPR:
cd /home/pi/openalpr

cmake ./
make
sudo make install
sudo cp -r /usr/local/lib/* /lib 
--
You received this message because you are subscribed to a topic in the Google Groups "OpenALPR" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openalpr/-vckIsPe618/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openalpr+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

load...@yahoo.com

unread,
Jan 14, 2016, 8:38:27 AM1/14/16
to OpenALPR, load...@yahoo.com
Hello again :)
Finally it works !

Now I need to figure out how to make it work through some scrypt so I can add a database and some more stuff.

Just wanted to say BIG THANKS  for the guide and replying to me.

malcolm stanley

unread,
Jan 14, 2016, 10:36:52 AM1/14/16
to OpenALPR, load...@yahoo.com
I'm glad it worked for you.
Nice to have an independent validation of the tutorial. 

malcolm stanley

unread,
Jan 17, 2016, 12:11:41 AM1/17/16
to OpenALPR
yeah, so I just tested it and got the following error:

alpr: error while loading shared libraries: libopenalpr.so.2: cannot open shared object file: No such file or directory

I copied that to /lib and tried again and got:
alpr: error while loading shared libraries: libstatedetection.so.2: cannot open shared object file: No such file or directory

so still some tweaks left.

On another note, I have set up streaming with both mjpg-streamer and with uv4l-server.
I can generate jpeg streams and view them using a browser;
alprd -f will not connect to the streams. 

the only thing I can see that might be an issue is that there is no ffmpg version for the Pi and when I load the libavcodec/libavformat combo and try to compile it throws errors.
SO I am compiling opencv essentially without codec support.
Will this prevent openalpr from connecting to the jpeg stream?

on a related note to that, I am not compiling with streamer loaded;
if I can make that work, might it solve this issue? 
any help appreciated

/malcolm
Message has been deleted

Timis Daniel

unread,
Jan 18, 2016, 4:34:06 AM1/18/16
to OpenALPR
just a small side note:
if building on the raspberry 2, you should use the make command with the -j4 argument that way it uses all the Pi cores for the make.(speed the make by quite a lot from my experience. especially on the Pi).

Timis Daniel

unread,
Feb 2, 2016, 6:13:02 AM2/2/16
to OpenALPR
I think I mentioned it in another post, but you can use the ffmpeg installation for debian/ubuntu on the raspberry pie. That's how I got it to work.link here https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

Malcolm

unread,
Feb 2, 2016, 6:54:19 AM2/2/16
to Timis Daniel, OpenALPR
I have successfully installed ffmpeg but when I do it causes the compilation of open cv to fail. 

This is on open cv 2.4.xx. 
I understand this may be fixed in 3.x but I do not think openalpr supports open cv 3.x. Do you know if this is true?

Sent from my iPhone

On Feb 2, 2016, at 6:13 AM, Timis Daniel <daniel....@gmail.com> wrote:

I think I mentioned it in another post, but you can use the ffmpeg installation for debian/ubuntu on the raspberry pie. That's how I got it to work.link here https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

--

Timis Daniel

unread,
Feb 2, 2016, 6:58:08 AM2/2/16
to OpenALPR, daniel....@gmail.com
Yes that's what I use.

Malcolm

unread,
Feb 2, 2016, 9:22:36 AM2/2/16
to Timis Daniel, OpenALPR
You use opencv 3.x?
Sent from my iPhone

On Feb 2, 2016, at 6:58 AM, Timis Daniel <daniel....@gmail.com> wrote:

Yes that's what I use.

--

Timis Daniel

unread,
Feb 8, 2016, 6:27:01 AM2/8/16
to OpenALPR, daniel....@gmail.com
So, I waited before posting so I could do some experimentation:

Installation method differs a bit if you use the raspicam or another compatible webcam like this:
1.For raspicam
-you need the unofficial v4l2 driver, the one from linux projects.
-to answer malcom's question, I used OpenCV like instructed here: http://www.pyimagesearch.com/2015/10/26/how-to-install-opencv-3-on-raspbian-jessie/
-I set it up to automatically grab the stream in the /etc/openalpr/alprd.conf file by setting stream = webcam
-I haven't had any notable success in making it work with mjpg-steramer
-more on this later when I retry this configuration.

2. Using a webcam:
-it works almost out of the box
-no v4l2 unoffcial driver needed
-used the easy way installation method(second method) : https://github.com/openalpr/openalpr/wiki/Compilation-instructions-(Ubuntu-Linux)
-check if the camera works directly or you need to configure the stream to work in YUYV format
-set the stream in /etc/openalpr/alprd.conf   stream = http://localhost:8080/?action=stream

Will come back with more info on how to work with the raspicamp as soon as I get on it.
Will be here for any help i can provide.

Malcolm Stanley

unread,
Feb 8, 2016, 8:14:50 AM2/8/16
to Timis Daniel, OpenALPR
So helpful!
and this works with alprd?

signature.asc

Timis Daniel

unread,
Feb 8, 2016, 9:01:07 AM2/8/16
to OpenALPR, daniel....@gmail.com
Yes, my focus is only on ALPRD. I think ALPR is not phased in any way by camera drivers, streams, etc, as it works with exiting images.

Malcolm Stanley

unread,
Feb 8, 2016, 11:32:54 AM2/8/16
to Timis Daniel, OpenALPR
This is so helpful.
Thanks so much.
I will try it out and see if I can replicate.

On Feb 8, 2016, at 09:01, Timis Daniel <daniel....@gmail.com> wrote:

Yes, my focus is only on ALPRD. I think ALPR is not phased in any way by camera drivers, streams, etc, as it works with exiting images.

signature.asc

malcolm stanley

unread,
Feb 14, 2016, 7:54:03 PM2/14/16
to OpenALPR, daniel....@gmail.com
yes, after a couple of tries I have a script that says in the end it can connect to the stream.

Thanks so much for your tips: they made the key difference.


On Monday, 8 February 2016 11:32:54 UTC-5, malcolm stanley wrote:
This is so helpful.
Thanks so much.
I will try it out and see if I can replicate.

On Feb 8, 2016, at 09:01, Timis Daniel <daniel....@gmail.com> wrote:

Yes, my focus is only on ALPRD. I think ALPR is not phased in any way by camera drivers, streams, etc, as it works with exiting images.

--
You received this message because you are subscribed to a topic in the Google Groups "OpenALPR" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openalpr/-vckIsPe618/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openalpr+unsubscribe@googlegroups.com.

Timis Daniel

unread,
Feb 15, 2016, 3:55:25 AM2/15/16
to OpenALPR, daniel....@gmail.com
Glad to have been of help. Most of the stuff I posted I wouldn't have been able to figure out without Matts help, so a shout out to him as well.

Timis Daniel

unread,
Feb 16, 2016, 9:38:04 AM2/16/16
to OpenALPR, daniel....@gmail.com
So in order to have alprd work with mjpgstreamer with the raspicam, the only thing you need to do differnt form when installing it to work with a differnt webcam is to install the uv4l driver prior to this. I tried it on a minibian distro and it works. 

Marc Assin

unread,
Feb 18, 2016, 4:23:47 PM2/18/16
to OpenALPR
Hi,
I'm new to Linux, OpenAlpr and RPI, so I hope I'm at the right place in the right forum.
I'm referring to a document "gist.githubusercontent.com/amstanley

I've issued the following commands
$ sudo apt-get update
$ sudo apt-get install uv4l uv4l-raspicam
$ sudo apt-get install uv4l-raspicam-extras
No problem.
When I run
$ sudo service uv4l_raspicam restart
I get
Job for uv4l_raspicam.service failed.
See 'systemctl status uv4l_raspicam.service' and 'journalctl -xn' for details.
 
This has worked yesterday and fails today. I've no clue about how come, the only thing I've done since, is a printer installation via CUPS, which I removed/purged from the system.

Any idea about how to troubleshoot ?
Thank you

Malcolm Stanley

unread,
Feb 18, 2016, 4:37:40 PM2/18/16
to Marc Assin, OpenALPR
so hard to say.
when you purged the CUPS installation you may have removed something that was needed.
is this on a Raspberry Pi? 
Are you able to go in and re-run the installation script from scratch?
I have found it is often simply easier to reload the OS from scratch and then run the script to install everything to a known working state than it is to try to make it work when it breaks. 
That is why I developed the script I did: as some point I needed to automate it as I was tired of doing it by hand.

Timis Daniel

unread,
Feb 19, 2016, 3:02:57 AM2/19/16
to OpenALPR
Have you added the repository key and link to apt?
curl http://www.linux-projects.org/listing/uv4l_repo/lrkey.asc | sudo apt-key add -
Add the following line to the file
/etc/apt/sources.list :
deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/ wheezy main

And just after this do apt-get update and apt-get install.

Marc Assin

unread,
Feb 21, 2016, 8:09:01 AM2/21/16
to OpenALPR
Hi,

@malcolm stanley
>Are you able to go in and re-run the installation script from scratch?
I ran the script again, from scratch ... and got the same problem.
So, I started the whooole thing from the beginning (download, copy to SD etc)
It went pretty well, over the critical part, up to section:
cd /home/pi/openalpr/libraries/opencv-3.1.0
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=/home/pi/openalpr/libraries/opencv_contrib-3.1.0/modules \
-D BUILD_EXAMPLES=ON

The line cmake -D CMAKE_BUILD_TYPE=RELEASE brings an error
CMake Error: The source directory "/home/pi/openalpr/libraries/opencv-3.1.0/build/CMAKE_BUILD_TYPE=RELEASE" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.

I've no problem making a mkdir, but I'm not sure it is the right way and I fear to break the whole setup again
PS: my last reply disappeared from the forum ?!? bizarre
 
@Timis Daniel
> Have you added the repository key and link to apt?
Yes
> Add the following line to the file /etc/apt/sources.list
Yes, I  followed the procedure carefully. 
I think the installation of CUPS was a very bad idea, I guess I corrupted something on disk. Let's forget about it, I'm almost through :-)

Thanks for your kind help
Raymond 
 

Malcolm Stanley

unread,
Feb 21, 2016, 5:23:26 PM2/21/16
to Marc Assin, OpenALPR
not sure what to say.
the first rule of troubleshooting is to read the error message

The source directory "/home/pi/openalpr/libraries/opencv-3.1.0/build/CMAKE_BUILD_TYPE=RELEASE” does not exist.

that seems actually like it should be true to me. 
have you tried running though that section manually?
remember that the \ is a line joiner,so the whole command without line breaks is:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=/home/pi/openalpr/libraries/opencv_contrib-3.1.0/modules -D BUILD_EXAMPLES=ON

It’s sort of like the first -D got dropped maybe?

signature.asc

Marc Assin

unread,
Feb 22, 2016, 4:04:02 AM2/22/16
to OpenALPR, zigo...@gmail.com
>> The source directory "/home/pi/openalpr/libraries/opencv-3.1.0/build/CMAKE_BUILD_TYPE=RELEASE” does not exist.
> that seems actually like it should be true to me.
Indeed

The path is valid up to "/home/pi/openalpr/libraries/opencv-3.1.0/build"
Admit, "CMAKE_BUILD_TYPE=RELEASE” doesn't look like a conventional directory. It makes me think that something went wrong upstream.

Any tip about how to tackle the problem ? maybe the path is build dynamically, any hint as to where to start ? or a word of explanation about the failing command
(I guess it is not the command line itself, rather a script that generated it.
I'm pretty sure it works for you, maybe a pre-requisite is not met beacause I started from scratch (environment variable ? or something obvious for you, not for me) 


> have you tried running though that section manually?
Yes
> remember that the \ is a line joiner, so the whole command without line breaks is:
Yes, my bag of tricks is exhausted

Thank you for the time and trouble helping a Linux newbee

Malcolm Stanley

unread,
Feb 22, 2016, 9:49:31 AM2/22/16
to Marc Assin, OpenALPR
SO I will literally wipe the Pi and run the script as documented from scratch.
last time I did so I ran it unattended and it completed, so not sure what is happening here.

{ -D text here } is setting parms, not paths, so I guess I do not understand why cmake is interpreting the -D statement as a path.


 It makes me think that something went wrong upstream.
Have you looked at the log? 



Marc Assin

unread,
Feb 22, 2016, 5:39:55 PM2/22/16
to OpenALPR, zigo...@gmail.com
> SO I will literally wipe the Pi and run the script as documented from scratch.
already done

but hmm (embarassed)
I thought the 2 dots at the end of the cmake command line was a typo, so I deleted them
Putting the 2 dots where they belong is much better ;-)
I re-ran the script, selecting opencv 3.1.0 instead of 3.0.0

Everything OK, till step #5, I got an error
(cv) pi@alpr:~/.virtualenvs/cv/lib/python2.7/site-packages $ ln -s /usr/local/lib/python2.7/site-packages/cv2.so cv2.so
ln: impossible to create the symbolic link « cv2.so »: The file exist
doing a
$ ls -l cv*
lrwxrwxrwx 1 pi pi 45 févr. 20 21:43 cv2.so -> /usr/local/lib/python2.7/site-packages/cv2.so
shows extra data, It looks like the link is already there, but is it Ok ? could it be the cause of the error in step 6 ?

On step #6
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define init function (PyInit_cv2)

Thank you

Malcolm Stanley

unread,
Feb 22, 2016, 11:07:10 PM2/22/16
to Marc Assin, OpenALPR
Yeah, punctuation can be important :-)

confused about your question, so:

cd /home/pi/openalpr/libraries/opencv-3.1.0
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=/home/pi/openalpr/libraries/opencv_contrib-3.1.0/modules \
-D BUILD_EXAMPLES=ON ..
make -j4
sudo make install
sudo ldconfig
cd ~/.virtualenvs/cv/lib/python2.7/site-packages/
ln -s /usr/local/lib/python2.7/site-packages/cv2.so cv2.so
# Compile openALPR:
cd /home/pi/openalpr/src
# nano CMakeLists.txt
# add the following lines in the section near the top that has SET() statements
# SET(OpenCV_DIR "/home/pi/openalpr/libraries/opencv-2.4.11/release")
# SET(Tesseract_DIR "/home/pi/openalpr/libraries/tesseract")
# do this using sed
sed -i '11 i SET(Tesseract_DIR "/home/pi/openalpr/libraries/tesseract")' /home/pi/openalpr/src/CMakeLists.txt
sed -i '11 i SET(OpenCV_DIR "~/openalpr/libraries/opencv-3.1.0/build")' /home/pi/openalpr/src/CMakeLists.txt
cmake ./
make -j4
sudo make install
sudo cp -r /usr/local/lib/* /lib


based on your comments
it sounds like you have traversed through line 150 in the Gist, 
which is the line which reads:  ln -s /usr/local/lib/python2.7/site-packages/cv2.so cv2.so

when you say 

On step #6
>>> import cv2

Which line are you referring to? I do not see a line which says ‘import’… 


signature.asc

Marc Assin

unread,
Feb 23, 2016, 3:28:44 AM2/23/16
to OpenALPR, zigo...@gmail.com

> confused about your question, so
Maybe I've gone off-track ... (yeah, newbees are a pain ...)
I think I've been referred to Adrian Rosebrock document, about installing opencv

Almost at the end "Step #6: Verifying your OpenCV 3 install"

$ workon cv
$ python
>>> import cv2
>>> cv2.__version__
'3.0.0'

Within the Python help, I could display the name of some modules, i.e. "fileinput","picamera", but no cv2.
The following works OK, it looks like my Python install is OK ?

>>> import fileinput
>>> import picamera

> it sounds like you have traversed through line 150 in the Gist, 
OK, you are right, but I think no harm has been done, let's resume with the script at line 150

Thank you for putting me back on-track :-)

Marc Assin

unread,
Feb 23, 2016, 1:21:27 PM2/23/16
to OpenALPR, zigo...@gmail.com
moving forward :-)
up to line 188, ok
edit alprd.conf, ok. While we are at it, let's check openalpr.conf, uv4l-raspicam.conf & uv4l-uvc.conf. ok
runing alprd -f 

INFO - Running OpenALPR daemon in the foreground.
INFO - Using: /etc/openalpr/alprd.conf for daemon configuration
INFO - Using: /data/plates-capt/ for storing valid plate images
INFO - country: eu -- config file: /etc/openalpr/openalpr.conf
INFO - Stream 1: http://127.0.0.1:8080/stream/video.mjpeg
WARN - Error connecting to Beanstalk.  Will retry.  (1)
INFO - Starting camera 1
INFO - Video stream connecting...
WARN - Stream http://127.0.0.1:8080/stream/video.mjpeg?openalprfiletype=file.mjpg failed to open. (2)
INFO - Video stream connecting...

(1) Indeed it is not running, didn't see it in the install procedure. I guess I can install it manually ?

(2) /stream/video.mjpeg?openalprfiletype=file.mjpg. Don't understand. Where has this been configured ? 
Issuing http://127.0.0.1:8080 brings de usv4l page, I can run the control panel, ok

Thank you

Malcolm Stanley

unread,
Feb 23, 2016, 5:59:24 PM2/23/16
to Marc Assin, OpenALPR
Please config the alprd.conf exactly according to the instructions.

1) in fact you cannot use the beanstalk yet with this instruction kit because I have not managed to get it into  the tutorial yet.
so if you say =1 on lines 213 or 217 it will attempt to push things to beanstalk and that will cause the errors you re seeing

As an aside, why is it saying EU? Did you set that for EU as opposed to the US default? Are you in the EU? If so, where?

2) I beleive the tutorial says http://127.0.0.1:8080/stream/video.mjpeg
the additional ?openalprfiletype=file.mjpg apparently gets added by alprd when it runs.

so here you are trying to get the alprd daemon to recognize the camera stream.
which means you’ve made it basically to the finish line and just need to cross over, which is the most frustrating part of this journey, as it is the hardest to troubleshoot. 
we’ve all been here: welcome to the club.
usually at this point someone asks about the camera, so I will: 
are you using the PI camera like I am, or a USB web cam?
I think much depends upon the answer to that question….

As an aside I have a scratch-disk gist if you look and there are raw tutorial lines/references in it for installing beanstalk and making it work: 
please feel free to pick that effort up and advance it by proposing tested lines for this tutorial if you think you can and are interested in trying.
If you do I will move this to a repo so you can make pull requests: just let me know if you want to do that.

signature.asc

Marc Assin

unread,
Feb 24, 2016, 4:39:54 AM2/24/16
to OpenALPR, zigo...@gmail.com
Hi,

Just for info, while running alpr (not alprd) I noticed a small discrepancy about openalpr.conf between what is expected and what is on disk  
So, in openalpr.conf I replaced  /usr/local/share/openalpr/runtime_data with /home/pi/openalpr/runtime_data (which contains the real stuff)

> Please config the alprd.conf exactly according to the instructions.
OK
> in fact you cannot use the beanstalk yet 
OK

> why is it saying EU?
I am in EU :-)
> Did you set that for EU as opposed to the US default?
Yes
> Are you in the EU? If so, where?
I'm in France. There are 2 types of license plates: "old" (ending with the department number) and "new".
I can post the pic if wanted. For my tests, I've created 2 sets of pics (old & new) taken at 8,6,4,2m

So far, I've fed a static jpeg file to alpr, the old plate got decoded correctly, the new one has a minor glitch (the tail of the "Q"), but acceptable.
This thing works:
$ alpr -c eu --config /etc/openalpr/openalpr.conf -n 1 --motion /data/plates-ref/5721MJ32-2.JPG
plate0: 1 results
    - 5721MJ32 confidence: 91.9072

I reached already so far with my previous project, using Motion, never managed to get a moving car decoded. 
So I droped it and restarted from scratch with uv4l. This is my 3rd attempt.
 

> /stream/video.mjpeg
I still fail to understand this syntax.
I guess it is about Feed and Streams but don't know how to build it, where it is created and where it is used.
The examples of the doc are fine, but they don't explain much. Any pointer to a good doc ?


> the additional ?openalprfiletype=file.mjpg apparently gets added by alprd when it runs.
OK, but it pops up like an error message (the beanstalk error is gone after install)

> are you using the PI camera like I am
I'm using the build-in camera

> I think much depends upon the answer to that question.
Aha, maybe it is linked to my question above (different syntax for different hardware ?) 
I see different wording in the doc (webcam, USB cam, Pi cam etc)

> I have a scratch-disk gist
where is it ?
> if you think you can and are interested in trying.
if you think you can cope with a newbee :-)  ....

> just let me know if you want to do that.
yes, I'll put my very modest talents to contribution

PS: I've been self-promoted to Linux apprentice level 2 :-) 

PS: this thing brings 2 windows, I've to work on it (flip)
Believe me or not, it hasn't frozen the CPU, hasen't crashed the web server, hasn't pop-up a ton of errors yet.
Is it the start of the end ?

Thanks a lot

Marc Assin

unread,
Feb 26, 2016, 4:15:28 AM2/26/16
to OpenALPR, zigo...@gmail.com
I  was happy too early :-( the web server crashes (the web page disappears)

Some items on my to-do list, maybe you have an idea /suggestion ....

1) > in fact you cannot use the beanstalk yet 
OK, but alpr should work by now.
When I feed a still image to alpr, it get's correctly decoded, but I can't see any effect, besides seeing the license plate displayed on screen.
Should't the counter be incremented and/or a copy of the pic put aside ? or does it work ONLY for moving license plates ?
Here under an extract of: /etc/openalpr/alprd.conf

; Determines whether images that contain plates should be stored to disk
store_plates = 1
store_plates_location = /data/plates-capt/   <-- folder empty, I guess something is missing

2) I guess I've to do some configuration to make this work
; upload address is the destination to POST to
upload_data = 1
upload_address = http://127.0.0.1:9000/push/  <-- I guess this is relativ to the root of the web server, but where is that defined ?
I see pointers to /etc/lighttpd but I got lost in the alias maze

3) I'm unable to login to the uv4l GUI, although I've edited the uv4l config files with a password

4) alprd -f      brings a "failed to open", it would be nice to know ; open what
INFO - Running OpenALPR daemon in the foreground.
INFO - Using: /etc/openalpr/alprd.conf for daemon configuration
INFO - Using: /data/plates-capt/ for storing valid plate images
INFO - country: eu -- config file: /etc/openalpr/openalpr.conf
INFO - Starting camera 1
INFO - Video stream connecting...

Maybe several symptoms stem from the same cause, hence solving one problem solves them all :-)


Timis Daniel

unread,
Feb 26, 2016, 4:36:42 AM2/26/16
to OpenALPR, zigo...@gmail.com
OK, but alpr should work by now.
When I feed a still image to alpr, it get's correctly decoded, but I can't see any effect, besides seeing the license plate displayed on screen.
Should't the counter be incremented and/or a copy of the pic put aside ? or does it work ONLY for moving license plates ?
Here under an extract of: /etc/openalpr/alprd.conf

; Determines whether images that contain plates should be stored to disk
store_plates = 1
store_plates_location = /data/plates-capt/   <-- folder empty, I guess something is missing


That is the configuration file for Alprd, the Daemon, normal Alpr will not save a image that you already have. That option enables you to save images with detected plates on them from a vide stream.

alprd -f      brings a "failed to open", it would be nice to know ; open what
INFO - Running OpenALPR daemon in the foreground.
INFO - Using: /etc/openalpr/alprd.conf for daemon configuration
INFO - Using: /data/plates-capt/ for storing valid plate images
INFO - country: eu -- config file: /etc/openalpr/openalpr.conf
INFO - Starting camera 1
INFO - Video stream connecting...

Maybe several symptoms stem from the same cause, hence solving one problem solves them all :-)


1. You need to run alprd with some parameters : ./alprd --config /etc/openalpr -f  
2. It failed to open the video stream indicated it should run on, you can see and change the stream location in the /etc/openalpr/alprd.conf file 

[daemon]

; country determines the training dataset used for recognizing plates.  Valid values are: us, eu
country = us

; text name identifier for this location
site_id = your-unique-sitename

; Declare each stream on a separate line
; each unique stream should be defined as stream = [url]

stream = http://127.0.0.1/example_video_stream.mjpeg
;stream = http://127.0.0.1/example_second_stream.mjpeg
;stream = webcam

; topn is the number of possible plate character variations to report
topn = 10

; Determines whether images that contain plates should be stored to disk
store_plates = 0
store_plates_location = /var/lib/openalpr/plateimages/

; upload address is the destination to POST to
upload_data = 0
upload_address = http://localhost:9000/push/


You can see the stream configuration part of the alprd.conf file underlined and in bold.
If you have generated a stream with mjpg streamer indicate it with the line :


don't forget to comment out the other streams that you are not using with ; at the start of the line.
Message has been deleted

Marc Assin

unread,
Feb 26, 2016, 7:30:53 PM2/26/16
to OpenALPR, zigo...@gmail.com
Thank you for the hints, much appreciated, but ...
Well ... I tried several combinations, no luck.
I've an understanding problem, that is: what should match what ?
I see the stream definitions in alprd.conf but don't know which one is right for me. I guess it depends on the setup. The doc show some examples but the newbee is lost.
It would be great if I could get the config files for my installation
/etc/openalpr/openalprd.conf
/etc/openalpr/openalpr.conf
/etc/uv4l/uv4l-raspicam.conf
/etc/uv4l/uv4l-uvc.conf

My config
Raspberry Pi 2 Model B, 
ARMv7,  700 Mhz
1GB RAM, 32GB disk
integrated network camera
Raspian Jessie

Thanks again
Architecture++.jpg

Timis Daniel

unread,
Feb 27, 2016, 5:24:49 AM2/27/16
to OpenALPR, zigo...@gmail.com


On Saturday, 27 February 2016 02:30:53 UTC+2, Marc Assin wrote:
My config
Raspberry Pi 2 Model B, 
ARMv7,  700 Mhz
1GB RAM, 32GB disk
integrated network camera
Raspian Jessie

Thanks again

Ok my bad I gave to much attention to that bit over there...
So if you're using the Pi camera just use this as your stream:
Stream = webcam

delete or comment the other stream location lines .

Marc Assin

unread,
Feb 27, 2016, 11:36:01 AM2/27/16
to OpenALPR, zigo...@gmail.com
> So if you're using the Pi camera just use this as your stream:
> Stream = webcam

I've implemented your last change
reboot
run: alprd --config /etc/openalpr -f
yaaa, no more "failed to start" :-), but

/dev/video0 does not support memory mapping
munmap: Invalid argument
Unable to stop the stream.: Bad file descriptor
munmap: Invalid argument

and guess what ! after a while ...
INFO - Video stream connected
DEBUG - Writing plate S721MJ32 (beausoleil-cam1-1456588065339) to queue.
WARN - Job: 1 failed to upload.  Will retry.

So, I've some files copied to the "data" directory and those error messages: 
the invalid argument and bad file descriptor may stem from the same cause. 
"Failed to upload" is not implemented yet, I've to check how to make "Post" work

A big many thanks

Any idea as to where is the root of the web server ? I'm supposed to create the "push" directory in the root.
It looks like it isn't Apache nor Lighttpd
 

Timis Daniel

unread,
Mar 2, 2016, 3:07:38 AM3/2/16
to OpenALPR, zigo...@gmail.com
Can't help you on that matter right now, I have yet to use this functionality. For now I use the recognition data locally only.

Marc Assin

unread,
Mar 2, 2016, 8:05:44 AM3/2/16
to OpenALPR, zigo...@gmail.com
Le mercredi 2 mars 2016 09:07:38 UTC+1, Timis Daniel a écrit :
Can't help you on that matter right now,
No problem. Your help has been much appreciated.

So far, I've alprd running, with a preview on screen. 
beanstalkd is running as well, although not sure about the config.
I'v' tested http POST, RPI to NAS, works OK. It looks like my setup is ok
For testing, I walk towards the cam with a faked plate, I see the plate being recognised, (messages are beeing displayed)... but the last step is still missing.
I realize now that I've to do some programming with beanstalkc (client) 

Thanks again

Marc Assin

unread,
Mar 3, 2016, 11:52:11 AM3/3/16
to OpenALPR, zigo...@gmail.com
you mean analyze the recognition results?
If the question is about
"I realize now that I've to do some programming with beanstalkc (client) "
then, yes :-)
I understand that the last step is not a "ready to go kit" as there may be possibly a large number of different applications, impossible to satisfy each, hence it is left open.
I'll look into beanstalkc and put my (very) scarce Python skills to work
I guess you are light years ahead of me, so you 'll probably get a solution before me.

PS: this Google group is bizarre, there is sometimes a laaarge delay to see my reply, some are lost. In general it is slow. Even if you are down under, it should be better. I'm running 2 Google groups and they are much faster, although I hang off a 1 Mbs (yep, burried deep in rural France

Marc Assin

unread,
Mar 6, 2016, 9:10:31 AM3/6/16
to OpenALPR, zigo...@gmail.com
error message while in gist procedure
--------------------------------------
Restarting from scratch, no CURBS, nothing else than Malcom's procedure
download last version of Jessie, 
--
-- Found Tesseract 
-- Found log4cplus 
-- Could NOT find JNI (missing:  JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
JAVA JNI library not found, skipping openalprjni compilation
-- Configuring done
-- Generating done

==================================
error message while running alprd
---------------------------------
pi@alpr:~ $ alprd --config /etc/openalpr -f
INFO - Running OpenALPR daemon in the foreground.
INFO - Using: /etc/openalpr/alprd.conf for daemon configuration
INFO - Using: /home/pi/plate-capt/ for storing valid plate images
INFO - country: eu -- config file: /etc/openalpr/openalpr.conf
INFO - Stream 1: webcam
INFO - Starting camera 1
INFO - Video stream connecting...
/dev/video0 does not support memory mapping
munmap: Invalid argument
munmap: Invalid argument
Unable to stop the stream.: Bad file descriptor
munmap: Invalid argument
munmap: Invalid argument
INFO - Video stream connected
DEBUG - Writing plate 5721MJ2 (beausoleil-cam1-1457197598397) to queue.
WARN - Job: 1 failed to upload.  Will retry.
DEBUG - put job id: 1
DEBUG - Writing plate 5721J2 (beausoleil-cam1-1457197599203) to queue.

===========================================================
file naming
-----------
I don't see a way to change the naming schema, 
i.e. a captured file: beausoleil-cam1-1457197605575.jpg
previously I was able to name it captured.jpg hence the result is one sigle file

Also, I dont see the file uv4l-uvc.conf anymore, maybe not needed 

Thanks for any comment

Malcolm Stanley

unread,
Mar 6, 2016, 9:29:33 AM3/6/16
to Marc Assin, OpenALPR
no idea. 

signature.asc

vinay kushwah

unread,
Mar 17, 2016, 2:24:50 AM3/17/16
to OpenALPR


On Saturday, 2 January 2016 22:52:32 UTC+5:30, malcolm stanley wrote:
Hey everyone
I got a new Pi for xmas (well, it was a drone that magically turned into a PI) 
I started playing with openALPR installs and noticed the tutorials were a bit out of date and whatever,
so I went through it and beat it up a bit and came up with a non-optimized installation that uses current versions of packages and seems to work.

This can be obviously improved upon, but I hope it makes it a little easier for noobs like me who are just looking for a recently tested tutorial that requires a minimum of googling around.

a copy of this is posted as a gist here:
https://gist.github.com/amstanley/9da7febc9a3e3c2228ee

This is not optimized for space or whatever, but does work.

how to read:

this is a heading, as denoted by the:
on a line where you see some text -> some more text
this is the text in the original tutorial -> this is what you should type instead
note: this is a note: don't type this.

installed and tested on a raspberry pi 2 model B 1GB using raspbian installed via noobs on a 32 GB memory card.
note that an 8GB card will fill before this tutorial ends, so you will need a card bigger than that.
Not tested on a 16GB card so no idea if that will work or not.

installation steps: 

Install Dependencies:
sudo apt-get install autoconf automake libtool
sudo apt-get install libpng12-dev
sudo apt-get install libjpeg62-dev -> sudo apt-get install libjpeg62-turbo-dev
sudo apt-get install libtiff4-dev -> sudo apt-get install libtiff5-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 libcurl4-openssl-dev liblog4cplus-1.0-4 liblog4cplus-dev uuid-dev

Clone openalpr:
cd /home/ubuntu  ( or /home/pi ) 

Create a directory and download libraries:
cd openalpr
mkdir libraries
cd libraries

using browser, nav to https://github.com/tesseract-ocr/tesseract and 'download zip' then
mv /home/pi/Downloads/tesseract-master.zip .

using browser navigate to https://github.com/tesseract-ocr/tessdata and 'download zip' then
mv /home/pi/Downloads/tessdata-master.zip .


don't do this:
mv opencv-2.4.8.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fopencvlibrary%2Ffiles%2Fopencv-unix%2F2.4.8%2Fopencv-2.4.8.zip%2Fdownload opencv-2.4.8.zip

instead do this:

extract the packages:
tar -zxvf tesseract-ocr-3.02.02.tar.gz -> unzip tesseract-master.zip
tar -zxvf leptonica-1.70.tar.gz -> tar -zxvf leptonica-1.71.tar.gz
unzip opencv-2.4.8.zip -> unzip opencv-2.4.11.zip

compile leptonica:
cd leptonica-1.70 -> cd leptonica-1.71
./configure
make
make install -> sudo make install

note generates following message:
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.

compile tesseract:
cd ../tesseract-ocr -> cd ../tesseract-master
./autogen.sh
./configure
make
sudo make install
sudo ldconfig
export TESSDATA_PREFIX=/home/pi/openalpr/libraries/tesseract-ocr/tessdata -> 
export TESSDATA_PREFIX=/home/pi/openalpr/libraries/tessdata-master

after sudo ldconfig you should 'make install LANGS="eng"' to set language preference. Not sure how this makes sense but may try it if I run into trouble. (update: I did not)


extract the tesseract language data:
cd ..
tar -zxvf tesseract-ocr-3.02.eng.tar.gz -> unzip tessdata-master.zip

compile opencv:
cd opencv-2.4.8 -> cd opencv-2.4.11
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make install

update the cmake lists 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")
-> none of this seems required, so skip

Compile openALPR:
cmake ./
make
sudo make install
sudo cp -r /usr/local/lib/* /lib 
note: seems like this last step is just a path issue... surely better way to do this)

alpr -c us ea7the.jpg

result: 
plate0: 10 results
    - EA7THE confidence: 92.4795
    - EA7TBE confidence: 84.0421
    - EA7TRE confidence: 83.1932
    - EA7TE confidence: 82.0527
    - EA7T8E confidence: 81.7845
    - EA7TME confidence: 80.8062
    - EA7THB confidence: 76.6468
    - EA7TH6 confidence: 76.6153
    - EA7TH confidence: 75.2232
    - EA7TBB confidence: 68.2095

alpr -c eu h786poj.jpg


Agus Toklik

unread,
Apr 24, 2016, 2:58:57 PM4/24/16
to OpenALPR
Hi, Malcolm Stanley
i'm try to install openalpr on my Raspberry Pi
but i got error

i just follow your instruction

what i do wrong ?

Malcolm Stanley

unread,
Apr 24, 2016, 4:13:36 PM4/24/16
to Agus Toklik, OpenALPR
yeah, 
if you read the gist, you will see the following in it around line 164:

make -j4
sudo make install
sudo cp -r /usr/local/lib/* /lib
# sudo cp /home/pi/openalpr/libraries/opencv-2.4.11/release/lib/* /lib
# note: seems like this last step is just a path issue... surely better way to do this)

you may want to un-# the line that says sudo cp /home/pi/openalpr/libraries/opencv-2.4.11/release/lib/* /lib
if you run it from the command line it may fix your problem directly...

I think this is a simple path issue but got distracted by another project before I fixed it. 
if you can find a better solution please let me know and I will update the Gist accordingly...

signature.asc

Matt

unread,
Apr 24, 2016, 10:25:34 PM4/24/16
to OpenALPR, agusud...@gmail.com
OpenALPR made it into the mainline Ubuntu 16.04 repos.  It builds for ARM as well.  I haven't tested it yet, but I assume an RPi2 should be able to pull down the openalpr packages with apt-get install and run without having to compile.
To unsubscribe from this group and all its topics, send an email to openalpr+unsubscribe@googlegroups.com.

Malcolm Stanley

unread,
Apr 24, 2016, 10:29:32 PM4/24/16
to Matt, OpenALPR, agusud...@gmail.com
oh wow, now I have got to go try that…
been very distracted with a new x-carve so have not worked on this in a while...

To unsubscribe from this group and all its topics, send an email to openalpr+u...@googlegroups.com.
signature.asc

Agus Toklik

unread,
Apr 25, 2016, 10:59:58 AM4/25/16
to OpenALPR
i'm try follow The Easy Way instruction 

test on raspberry pi B+
and it's work

thnks Matt and Malcolm Stanley

samira tezkratt

unread,
May 3, 2016, 9:48:48 AM5/3/16
to OpenALPR, agusud...@gmail.com

hello here I am about to install openalpr my raspberry pi and I have the same error as you partgé in that room are attached can I have the solution how is your thank you

Agus Toklik

unread,
May 3, 2016, 10:17:26 AM5/3/16
to OpenALPR, agusud...@gmail.com
Hi samira tezkratt, 
What's your OS on raspberry pi Wheezy or  Jessei ?, this issue when you install opencv on raspberry pi.
Wheezy and Jessei need different step to install opencv
you can read in this site to install opencv on raspberry pi 

samira tezkratt

unread,
May 3, 2016, 1:15:19 PM5/3/16
to OpenALPR
hello thank you for answered my bone is wheezy I install open 2.4.11 cv I have the same error as you change your zs what version opencv are what your opencv install version 3.0

Mark Theunissen

unread,
Jul 5, 2016, 4:08:49 AM7/5/16
to OpenALPR, agusud...@gmail.com
Hi all,

OpenALPR would need to be compiled for ARM and included in Raspbian to be truly available on the Raspberry Pi. I can see the package in Debian sid but that doesn't guarantee it'll get into Raspbian. 

I am planning on building an ARM Dockerfile that contains all the latest versions of the OpenALPR dependencies using the gist in this thread, that can be used on the Raspi like any other Docker container. 

It is even possible to cross-compile and build it on Dockerhub as per https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/.

Before I start, has anyone done this already?

Thanks
Mark

To unsubscribe from this group and all its topics, send an email to openalpr+u...@googlegroups.com.

Johann Medina

unread,
Oct 2, 2016, 12:41:21 PM10/2/16
to OpenALPR
Great Agus, 
It also works for me "The Easy Way" https://github.com/openalpr/openalpr/wiki/Compilation-instructions-(Ubuntu-Linux) 
Previous to all steps a "sudo apt-get update" should be executed

Thanks to everyone...

Israel Soto

unread,
Oct 17, 2016, 8:47:43 PM10/17/16
to OpenALPR
Has anyone had any trouble with this command? 

sudo apt-get install python-openalpr

Ovidiu Valea

unread,
Jan 8, 2017, 6:42:15 PM1/8/17
to OpenALPR
Hey, I had problems running the ./configure on tesseract-master.It fails with an error like "syntax error near unexpected token `-mavx,'". Here https://github.com/tesseract-ocr/tesseract/wiki/Compiling it says to double check the autoconf-archive package.. I did that and the error still persists.
 
Any ideas?
 
Thanks in advance.

Ovidiu Valea

unread,
Jan 11, 2017, 2:53:44 PM1/11/17
to OpenALPR


On Monday, January 9, 2017 at 1:42:15 AM UTC+2, Ovidiu Valea wrote:
Hey, I had problems running the ./configure on tesseract-master.It fails with an error like "syntax error near unexpected token `-mavx,'". Here https://github.com/tesseract-ocr/tesseract/wiki/Compiling it says to double check the autoconf-archive package.. I did that and the error still persists.
 
Any ideas?
 Solution: run
git init
in tesseract-master folder.

Mario Oviedo Barrantes

unread,
Jan 14, 2017, 8:46:53 AM1/14/17
to OpenALPR
Hi good morning. I am from Costa Rica and maybe someone can I help me to identified the plate numbers ID of the cars in Costa Rica. I am try with different methods and the 75% can identified the number good. My problem is because in some plates number I will need to identified vertical characters first, the mean of those vertical characters is the category of the car. I will attach some examples. I don't have any problem when the plate numbers are all in horizontal positions in one row. But in plates that contain at left maybe two or three characters(numbers or letters) I will need to identified this characters and then the other part of the plate. For example in the plate: at left:262(three rows) and then 474 I will need to get first the category and then the rest of the plate ID, maybe-> 262-474 or 262_474 or 262 474. Other Example: at lef one lether = M and then 378646, I will need the result some like this: M378646 or M-378646 or M_378646 or M/378646 or M 378646. Othe Example: at left: CL(Two letther at left in two rows) and then the second part of the plate number: 232516, I will need some like: CL-232516 or CL_232516 or CL/232516 or CL 232516. Please I need someone can help me with this problem. Thank you so much.
2faecc5c-ecfd-4062-ad85-7eb0ec82618a.jpg
6fca1dae-40fa-408b-995b-f73dd056fe0e.jpg
2709f845-9dfa-4192-96a0-32cb1cd8f8d3.jpg
cl2.jpg
fe9251bc-f05c-4092-be75-5a8863729f86.jpg
IMG_20161118_073009.jpg
IMG_20161118_080219.jpg
IMG_20161118_084527.jpg
IMG_20161118_093152.jpg

Matt

unread,
Jan 16, 2017, 4:55:00 PM1/16/17
to OpenALPR
It's quite tricky.  The current technique is unable to handle the vertical lineup of characters on the left.  You could hand-code an algorithm to do it though.  There's neural network (data-driven) approaches that can give you very good accuracy.  However, it requires massive amounts (minimum 50k+ samples) of data and they're too slow for realtime plate detection without a decent GPU.

aagam shah

unread,
Feb 25, 2017, 6:37:23 AM2/25/17
to OpenALPR
Hello,

According to your post you were able to install openalpr on Raspberry Pi model B using easy way. Can you please tell which OS you were using on raspberry Pi. In my case I have raspbian.

Thanks

Malcolm Stanley

unread,
Feb 25, 2017, 11:02:49 AM2/25/17
to aagam shah, OpenALPR
Ubuntu.

aagam shah

unread,
Feb 25, 2017, 11:16:54 AM2/25/17
to OpenALPR
Ubuntu on Raspberry Pi ?? Or it was raspbian ?

Malcolm Stanley

unread,
Feb 25, 2017, 11:47:01 AM2/25/17
to aagam shah, OpenALPR
when you set up your raspberry pi you can specify the operating system you wish to use.
Raspian is an option, Ubunrtu is another one. 

Sushant Sharma

unread,
Mar 20, 2018, 4:35:25 PM3/20/18
to OpenALPR
I had to do 
sudo apt-get install autoconf
as well. Maybe you can add this to your list of dependencies.


On Saturday, January 2, 2016 at 9:22:32 AM UTC-8, malcolm stanley wrote:
Reply all
Reply to author
Forward
0 new messages