pax_global_header 0000666 0000000 0000000 00000000064 12664642524 0014525 g ustar 00root root 0000000 0000000 52 comment=a07b91963381b54b4340de95d52eb384947de99f
openalpr_2.2.4.orig/ 0000775 0000000 0000000 00000000000 12664642524 0014373 5 ustar 00root root 0000000 0000000 openalpr_2.2.4.orig/.dockerignore 0000664 0000000 0000000 00000000020 12664642524 0017037 0 ustar 00root root 0000000 0000000 .git
Dockerfile
openalpr_2.2.4.orig/.travis.yml 0000664 0000000 0000000 00000001067 12664642524 0016510 0 ustar 00root root 0000000 0000000 before_install:
- sudo add-apt-repository ppa:yjwong/opencv2 -y
- sudo add-apt-repository ppa:lyrasis/precise-backports -y
- sudo apt-get update -q
install: sudo apt-get -y install libopencv-dev libtesseract-dev git cmake build-essential libleptonica-dev liblog4cplus-dev libcurl3-dev beanstalkd
before_script:
- mkdir -p ./src/build/
- cd ./src/build/
- cmake ..
script:
- make
- make openalpr-utils-classifychars openalpr-utils-tagplates openalpr-utils-benchmark openalpr-utils-prepcharsfortraining
- sudo make install
- ./tests/unittests
openalpr_2.2.4.orig/CONTRIBUTING.md 0000664 0000000 0000000 00000000161 12664642524 0016622 0 ustar 00root root 0000000 0000000 To get started, sign the Contributor License Agreement.
openalpr_2.2.4.orig/Dockerfile 0000664 0000000 0000000 00000001230 12664642524 0016361 0 ustar 00root root 0000000 0000000 from ubuntu:14.04
# Install prerequisites
run apt-get update && apt-get install -y \
build-essential \
cmake \
curl \
git \
libcurl3-dev \
libleptonica-dev \
liblog4cplus-dev \
libopencv-dev \
libtesseract-dev \
wget
# Copy all data
copy . /srv/openalpr
# Setup the build directory
run mkdir /srv/openalpr/src/build
workdir /srv/openalpr/src/build
# Setup the compile environment
run cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc ..
# Compile the library
run make
# Install the binaries/libraries to your local system (prefix is /usr)
run make install
workdir /data
entrypoint ["alpr"]
openalpr_2.2.4.orig/LICENSE 0000664 0000000 0000000 00000103330 12664642524 0015400 0 ustar 00root root 0000000 0000000 GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
.
openalpr_2.2.4.orig/README.md 0000664 0000000 0000000 00000013161 12664642524 0015654 0 ustar 00root root 0000000 0000000 openalpr
========
OpenALPR is an open source *Automatic License Plate Recognition* library written in C++ with bindings in C#, Java, Node.js, Go, and Python. The library analyzes images and video streams to identify license plates. The output is the text representation of any license plate characters.
Check out a live online demo here: http://www.openalpr.com/demo-image.html
User Guide
-----------
OpenALPR includes a command line utility. Simply typing "alpr [image file path]" is enough to get started recognizing license plate images.
For example, the following output is created by analyzing this image:

```
user@linux:~/openalpr$ alpr ./samplecar.png
plate0: top 10 results -- Processing Time = 58.1879ms.
- PE3R2X confidence: 88.9371
- PE32X confidence: 78.1385
- PE3R2 confidence: 77.5444
- PE3R2Y confidence: 76.1448
- P63R2X confidence: 72.9016
- FE3R2X confidence: 72.1147
- PE32 confidence: 66.7458
- PE32Y confidence: 65.3462
- P632X confidence: 62.1031
- P63R2 confidence: 61.5089
```
Detailed command line usage:
```
user@linux:~/openalpr$ alpr --help
USAGE:
alpr [-c ] [--config ] [-n ] [--seek
] [-p ] [--clock] [-d] [-j] [--]
[--version] [-h]
Where:
-c , --country
Country code to identify (either us for USA or eu for Europe).
Default=us
--config
Path to the openalpr.conf file
-n , --topn
Max number of possible plate numbers to return. Default=10
--seek
Seek to the specified millisecond in a video file. Default=0
-p , --pattern
Attempt to match the plate number against a plate pattern (e.g., md
for Maryland, ca for California)
--clock
Measure/print the total time to process image and all plates.
Default=off
-d, --detect_region
Attempt to detect the region of the plate image. [Experimental]
Default=off
-j, --json
Output recognition results in JSON format. Default=off
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--version
Displays version information and exits.
-h, --help
Displays usage information and exits.
Image containing license plates
OpenAlpr Command Line Utility
```
Binaries
----------
Pre-compiled Windows binaries can be downloaded on the [releases page] (https://github.com/openalpr/openalpr/releases)
Install OpenALPR on Ubuntu 14.04 x64 with the following commands:
wget -O - http://deb.openalpr.com/openalpr.gpg.key | sudo apt-key add -
echo "deb http://deb.openalpr.com/master/ openalpr main" | sudo tee /etc/apt/sources.list.d/openalpr.list
sudo apt-get update
sudo apt-get install openalpr openalpr-daemon openalpr-utils libopenalpr-dev
Documentation
---------------
Detailed documentation is available at [doc.openalpr.com] (http://doc.openalpr.com/)
Integrating the Library
-----------------------
OpenALPR is written in C++ and has bindings in C#, Python, Node.js, Go, and Java. Please see this guide for examples showing how to run OpenALPR in your application: http://doc.openalpr.com/bindings.html
Compiling
-----------
[](https://travis-ci.org/openalpr/openalpr)
OpenALPR compiles and runs on Linux, Mac OSX and Windows.
OpenALPR requires the following additional libraries:
- Tesseract OCR v3.0.3 (https://code.google.com/p/tesseract-ocr/)
- OpenCV v2.4.8+ (http://opencv.org/)
After cloning this GitHub repository, you should download and extract Tesseract and OpenCV source code into their own directories. Compile both libraries.
Please follow these detailed compilation guides for your respective operating system:
* [Windows] (https://github.com/openalpr/openalpr/wiki/Compilation-instructions-(Windows))
* [Ubuntu Linux] (https://github.com/openalpr/openalpr/wiki/Compilation-instructions-(Ubuntu-Linux))
* [OS X] (https://github.com/openalpr/openalpr/wiki/Compilation-instructions-(OS-X))
* [Android Library] (https://github.com/SandroMachado/openalpr-android)
* [Android Application Sample] (https://github.com/sujaybhowmick/OpenAlprDroidApp)
* [iOS] (https://github.com/twelve17/openalpr-ios)
If all went well, there should be an executable named *alpr* along with *libopenalpr-static.a* and *libopenalpr.so* that can be linked into your project.
Docker
------
``` shell
# Build docker image
docker build -t openalpr https://github.com/openalpr/openalpr.git
# Download test image
wget http://plates.openalpr.com/h786poj.jpg
# Run alpr on image
docker run -it --rm -v $(pwd):/data:ro openalpr -c eu h786poj.jpg
```
Questions
---------
Please post questions or comments to the Google group list: https://groups.google.com/forum/#!forum/openalpr
Contributions
-------------
Improvements to the OpenALPR library are always welcome. Please review the [OpenALPR design description](https://github.com/openalpr/openalpr/wiki/OpenALPR-Design) and get started.
Code contributions are not the only way to help out. Do you have a large library of license plate images? If so, please upload your data to the anonymous FTP located at upload.openalpr.com. Do you have time to "tag" plate images in an input image or help in other ways? Please let everyone know by posting a note in the forum.
License
-------
Affero GPLv3
http://www.gnu.org/licenses/agpl-3.0.html
openalpr_2.2.4.orig/cla.txt 0000664 0000000 0000000 00000012707 12664642524 0015702 0 ustar 00root root 0000000 0000000 In order to clarify the intellectual property license granted with Contributions from any person or entity, OpenALPR Technology, Inc. ("OpenALPR") must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of OpenALPR; it does not change your rights to use your own Contributions for any other purpose.
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to OpenALPR. Except for the license granted herein to OpenALPR and recipients of software distributed by OpenALPR, You reserve all right, title, and interest in and to Your Contributions.
Definitions.
"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with OpenALPR. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to OpenALPR for inclusion in, or documentation of, any of the products owned or managed by OpenALPR (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to OpenALPR or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, OpenALPR for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."
Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to OpenALPR and to recipients of software distributed by OpenALPR a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.
Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to OpenALPR and to recipients of software distributed by OpenALPR a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.
You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your Contributions to OpenALPR, or that your employer has executed a separate Corporate CLA with OpenALPR.
You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions.
You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
Should You wish to submit work that is not Your original creation, You may submit it to OpenALPR separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [[]named here]".
You agree to notify OpenALPR of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.
openalpr_2.2.4.orig/config/ 0000775 0000000 0000000 00000000000 12664642524 0015640 5 ustar 00root root 0000000 0000000 openalpr_2.2.4.orig/config/alprd.conf 0000664 0000000 0000000 00000001363 12664642524 0017614 0 ustar 00root root 0000000 0000000 [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/
openalpr_2.2.4.orig/config/openalpr.conf.in 0000664 0000000 0000000 00000006450 12664642524 0020741 0 ustar 00root root 0000000 0000000
; Specify the path to the runtime data directory
runtime_dir = ${CMAKE_INSTALL_PREFIX}/share/openalpr/runtime_data
ocr_img_size_percent = 1.33333333
state_id_img_size_percent = 2.0
; Calibrating your camera improves detection accuracy in cases where vehicle plates are captured at a steep angle
; Use the openalpr-utils-calibrate utility to calibrate your fixed camera to adjust for an angle
; Once done, update the prewarp config with the values obtained from the tool
prewarp =
; detection will ignore plates that are too large. This is a good efficiency technique to use if the
; plates are going to be a fixed distance away from the camera (e.g., you will never see plates that fill
; up the entire image
max_plate_width_percent = 100
max_plate_height_percent = 100
; detection_iteration_increase is the percentage that the LBP frame increases each iteration.
; It must be greater than 1.0. A value of 1.01 means increase by 1%, 1.10 increases it by 10% each time.
; So a 1% increase would be ~10x slower than 10% to process, but it has a higher chance of landing
; directly on the plate and getting a strong detection
detection_iteration_increase = 1.1
; The minimum detection strength determines how sure the detection algorithm must be before signaling that
; a plate region exists. Technically this corresponds to LBP nearest neighbors (e.g., how many detections
; are clustered around the same area). For example, 2 = very lenient, 9 = very strict.
detection_strictness = 3
; The detection doesn't necessarily need an extremely high resolution image in order to detect plates
; Using a smaller input image should still find the plates and will do it faster
; Tweaking the max_detection_input values will resize the input image if it is larger than these sizes
; max_detection_input_width/height are specified in pixels
max_detection_input_width = 1280
max_detection_input_height = 720
; detector is the technique used to find license plate regions in an image. Value can be set to
; lbpcpu - default LBP-based detector uses the system CPU
; lbpgpu - LBP-based detector that uses Nvidia GPU to increase recognition speed.
; lbpopencl - LBP-based detector that uses OpenCL GPU to increase recognition speed. Requires OpenCV 3.0
; morphcpu - Experimental detector that detects white rectangles in an image. Does not require training.
detector = lbpcpu
; If set to true, all results must match a postprocess text pattern if a pattern is available.
; If not, the result is disqualified.
must_match_pattern = 0
; Bypasses plate detection. If this is set to 1, the library assumes that each region provided is a likely plate area.
skip_detection = 0
max_plate_angle_degrees = 15
ocr_min_font_point = 6
; Minimum OCR confidence percent to consider.
postprocess_min_confidence = 65
; Any OCR character lower than this will also add an equally likely
; chance that the character is incorrect and will be skipped. Value is a confidence percent
postprocess_confidence_skip_level = 80
debug_general = 0
debug_timing = 0
debug_detector = 0
debug_state_id = 0
debug_plate_lines = 0
debug_plate_corners = 0
debug_char_segment = 0
debug_char_analysis = 0
debug_color_filter = 0
debug_ocr = 0
debug_postprocess = 0
debug_show_images = 0
debug_pause_on_frame = 0
openalpr_2.2.4.orig/distros/ 0000775 0000000 0000000 00000000000 12664642524 0016062 5 ustar 00root root 0000000 0000000 openalpr_2.2.4.orig/distros/debian/ 0000775 0000000 0000000 00000000000 12664642524 0017304 5 ustar 00root root 0000000 0000000 openalpr_2.2.4.orig/distros/debian/README.source 0000664 0000000 0000000 00000001006 12664642524 0021460 0 ustar 00root root 0000000 0000000 This package uses quilt to manage all modifications to the upstream source.
Changes are stored in the source package as diffs in debian/patches and applied
during the build.
See /usr/share/doc/quilt/README.source for a detailed explanation.
This package uses the version 3.0 of the debian source package; An upstream
tarball is required to build it. This tarball can be generated automagically by
downloading the sources from the github repository with the following command:
fakeroot debian/rules get-orig-source
openalpr_2.2.4.orig/distros/debian/changelog 0000664 0000000 0000000 00000005504 12664642524 0021162 0 ustar 00root root 0000000 0000000 openalpr (2.2.4-1) unstable; urgency=low
* Added Python3 bindings (Closes: #815961)
* Remove frame number from JSON output (Closes: #813290)
* Use dh-python to generate proper depends for python-openalpr (Closes:
#815960)
* Change python-openalpr from arch any to arch all (Closes: #815959)
* Fixed build failure on Hurd (Closes: #812738)
* Add bindings package for python3, python3-openalpr
* Upload sponsored by Petter Reinholdtsen
-- Matthew Hill Sun, 28 Feb 2016 09:51:25 -0500
openalpr (2.2.3-1) unstable; urgency=low
* Changed Debian config to build on all architectures
* Upload sponsored by Petter Reinholdtsen
-- Matthew Hill Sun, 24 Jan 2016 15:33:25 -0500
openalpr (2.2.2-1) unstable; urgency=low
* Minor bug fixes
* Upload sponsored by Petter Reinholdtsen
-- Matthew Hill Wed, 6 Jan 2016 06:48:05 -0500
openalpr (2.2.1-1) unstable; urgency=low
* Initial upload to Debian (Closes: #747509)
* Debian Packaging enhancements
* Added binding for Go
* Upload sponsored by Petter Reinholdtsen
-- Matthew Hill Thu, 17 Dec 2015 18:10:05 -0500
openalpr (2.2.0-0.1) experimental; urgency=low
* Non-maintainer upload
* Added training data for Singapore and Great Britain
* Improved accuracy and reduced false positives for US plate detector
* Improved support for 2-line plates (requires training data)
* Supports analyzing multiple training datasets in one pass
* Added OpenCL GPU support (works with Nvidia, AMD, and Intel GPUs)
* Upgraded to OpenCV 3.0
* Support Tesseract 3.04
* .NET library API improvements
* Bug Fixes
-- Matthew Hill Mon, 19 Oct 2015 18:15:00 -0500
openalpr (2.1.0-0.1) experimental; urgency=low
* Non-maintainer upload
* Added per-character details to API output
* Bug fixes
* Added camera calibration utility
* Motion detector for video frames
* Full UTF-8 character support
* Support for South Korean and Australian plates
* Experimental morphological plate detector
* Pattern matching for European countries
-- Matthew Hill Thu, 18 Jun 2015 20:31:00 -0500
openalpr (2.0.1-0.1) experimental; urgency=low
* Non-maintainer upload
* Bindings for Java, C#, and Python
* API changes/simplification
* CUDA support
* Bug fixes
* Faster initial load time
* Additional Config options
* Library supports multi-line plates
-- Matthew Hill Thu, 12 Mar 2015 23:46:00 -0500
openalpr (2.0.0-0.1) experimental; urgency=low
* Non-maintainer upload
* Upstream release with several fixes:
- Compilation of utilities enabled
- installation of static library
- alpr build against shared library
-- Emmanuel Papin Sun, 14 Dec 2014 19:39:07 +0200
openalpr_2.2.4.orig/distros/debian/compat 0000664 0000000 0000000 00000000002 12664642524 0020502 0 ustar 00root root 0000000 0000000 9
openalpr_2.2.4.orig/distros/debian/control 0000664 0000000 0000000 00000012442 12664642524 0020712 0 ustar 00root root 0000000 0000000 Source: openalpr
Section: video
Priority: optional
Maintainer: Matthew Hill
Build-Depends: debhelper (>= 9), cmake, quilt,
libtesseract-dev, libleptonica-dev, liblog4cplus-dev,
libcurl3-dev, libopencv-dev, default-jdk,
python, python3, dh-python
Standards-Version: 3.9.6
Homepage: https://github.com/openalpr/openalpr
Vcs-Browser: https://github.com/openalpr/openalpr
Vcs-Git: https://github.com/openalpr/openalpr.git
Package: libopenalpr2
Section: libs
Architecture: any
Depends: libopenalpr-data (= ${source:Version}), ${shlibs:Depends},
${misc:Depends}
Description: Automated License Plate Recognition library (OpenALPR)
OpenALPR is an open source Automatic License Plate Recognition library written
in C++. The library analyzes images and identifies license plates. The output
is the text representation of any license plate characters found in the image.
.
This package contains the runtime libraries used to interface with OpenALPR.
Package: libopenalpr-dev
Section: libdevel
Architecture: any
Depends: libopenalpr2 (= ${binary:Version}), ${misc:Depends}
Description: Development files for the OpenALPR library
OpenALPR is an open source Automatic License Plate Recognition library written
in C++. The library analyzes images and identifies license plates. The output
is the text representation of any license plate characters found in the image.
.
This package contains the header files and static libraries used to link
OpenALPR into another program.
Package: libopenalpr-data
Section: misc
Architecture: all
Depends: ${misc:Depends}
Description: Runtime data for the OpenALPR library
OpenALPR is an open source Automatic License Plate Recognition library written
in C++. The library analyzes images and identifies license plates. The output
is the text representation of any license plate characters found in the image.
.
This package contains the runtime training data used by OpenALPR to recognize
license plates from various countries.
Package: openalpr
Architecture: any
Depends: libopenalpr2 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Description: Command line program to operate the OpenALPR library
OpenALPR is an open source Automatic License Plate Recognition library written
in C++. The library analyzes images and identifies license plates. The output
is the text representation of any license plate characters found in the image.
.
This package contains a command-line program to analyze images for license
plates.
Package: openalpr-daemon
Architecture: any
Depends: libopenalpr2 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends},
adduser,
beanstalkd
Description: Daemon to run OpenALPR in the background
OpenALPR is an open source Automatic License Plate Recognition library written
in C++. The library analyzes images and identifies license plates. The output
is the text representation of any license plate characters found in the image.
.
The OpenALPR daemon allows you to monitor a camera stream for license plate
numbers in the background. Alprd runs as a daemon process on Linux.
.
The plate numbers can be streamed to another server (via HTTP posts) or can be
consumed programmatically via a beanstalkd queue.
Package: openalpr-utils
Section: utils
Architecture: any
Depends: libopenalpr2 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Description: Utilities for the OpenALPR library
OpenALPR is an open source Automatic License Plate Recognition library written
in C++. The library analyzes images and identifies license plates. The output
is the text representation of any license plate characters found in the image.
.
The OpenALPR utils package contains a collection of binaries that help with
training new data. The following binaries are included:
.
openalpr-utils-calibrate - Calibrates the software for cameras capturing plate
images at an angle
.
openalpr-utils-benchmark - Benchmarks accuracy/speed against a testing dataset
.
openalpr-utils-tagplates - Utility to tag the location and plate number for
testing and training
.
openalpr-utils-classifychars - Extracts character images from cropped plate
images for OCR training
.
openalpr-utils-prepcharsfortraining - Reformates character images into a format
that Tesseract can use for OCR training
Package: python-openalpr
Section: python
Architecture: all
Depends: libopenalpr-dev (>= ${binary:Version}),
${python:Depends}, ${misc:Depends}
Description: Python binding for OpenALPR library
OpenALPR is an open source Automatic License Plate Recognition library written
in C++. The library analyzes images and identifies license plates. The output
is the text representation of any license plate characters found in the image.
.
The Python package allows Python code to interface with OpenALPR directly via
native Python bindings.
Package: python3-openalpr
Section: python
Architecture: all
Depends: libopenalpr-dev (>= ${source:Version}),
${python3:Depends}, ${misc:Depends}
Description: Python 3 binding for OpenALPR library
OpenALPR is an open source Automatic License Plate Recognition library written
in C++. The library analyzes images and identifies license plates. The output
is the text representation of any license plate characters found in the image.
.
The Python 3 package allows Python 3 code to interface with OpenALPR directly
via native Python 3 bindings.
openalpr_2.2.4.orig/distros/debian/copyright 0000664 0000000 0000000 00000032245 12664642524 0021245 0 ustar 00root root 0000000 0000000 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: openalpr
Source: https://github.com/openalpr/openalpr
Files: *
Copyright: 2013-2016 Matt Hill
License: AGPL-3+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
Files: src/openalpr/support/re2.h src/openalpr/support/re2/*
Copyright: 2008 The RE2 Authors.
License: BSD-3-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Files: src/openalpr/support/re2/util/rune.cc
Copyright: 2002 by Lucent Technologies
License: Expat-Lucent
Permission to use, copy, modify, and distribute this software for any
purpose without fee is hereby granted, provided that this entire notice
is included in all copies of any software which is or includes a copy
or modification of this software and in all copies of the supporting
documentation for such software.
.
THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY
REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
Files: src/openalpr/support/tinydir.h
Copyright: 2013, Cong Xu
License: BSD-2-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License: Expat
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Files: src/tclap/*
Copyright: 2004 Michael E. Smoot, Daniel Aarno.
2004 Michael E. Smoot, Daniel Aarno. All rights reverved.
2003 Michael E. Smoot. All rights reverved.
2006 Oliver Kiddle All rights reverved.
2005 Michael E. Smoot, Daniel Aarno, Erik Zeek. All rights reverved.
2003-2005 Michael E. Smoot . All rights reverved.
2004-2005 Michael E. Smoot All rights reverved.
2003 Michael E. Smoot .
2007 Daniel Aarno, Michael E. Smoot . All rights reverved.
2004 Michael E. Smoot, Daniel Aarno . All rights reverved.
License: Expat
Files: src/openalpr/simpleini/*
Copyright: 2006-2013 Brodie Thiesfield
License: Expat
License: Zlib
This software is provided 'as-is', without any express
or implied warranty. In no event will the authors be held
liable for any damages arising from the use of this software.
.
Permission is granted to anyone to use this software for
any purpose, including commercial applications, and to alter
it and redistribute it freely, subject to the following restrictions:
.
1. The origin of this software must not be misrepresented;
you must not claim that you wrote the original software.
If you use this software in a product, an acknowledgment
in the product documentation would be appreciated but
is not required.
.
2. Altered source versions must be plainly marked as such,
and must not be misrepresented as being the original software.
.
3. This notice may not be removed or altered from any
source distribution.
Files: src/openalpr/TRexpp.h
Copyright: 2003-2004 Alberto Demichelis
License: Zlib
Files: src/openalpr/support/tinythread.* src/openalpr/support/fast_mutex.h
Copyright: 2010-2012 Marcus Geelnard
License: Zlib
Files: src/openalpr/support/utf8.h src/openalpr/support/utf8.cpp src/openalpr/support/utf8/*
Copyright: 2006 Nemanja Trifunovic
License: Boost
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
.
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Files: src/openalpr/support/re2/util/valgrind.h
Copyright: 2000-2009 Julian Seward. All rights reserved.
License: BSD-4-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.
2. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
.
3. Altered source versions must be plainly marked as such, and must
not be misrepresented as being the original software.
.
4. The name of the author may not be used to endorse or promote
products derived from this software without specific prior written
permission.
.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Files: src/bindings/java/src/com/openalpr/jni/json/*
Copyright: 2010 The Android Open Source Project
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
/usr/share/common-licenses/Apache-2.0 (on Debian systems)
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Files: src/tests/catch.hpp
Copyright: Two Blue Cubes Ltd. All rights reserved.
License: Boost-1.0
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the following conditions:
.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Materials.
.
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
Files: src/openalpr/cjson.*
Copyright: 2009 Dave Gamble
License: Expat
Files: src/openalpr/support/windows/dirent.h
Copyright: 2006-2012 Toni Ronkko
License: Expat
Files: src/openalpr/simpleini/ConvertUTF.*
Copyright: 2001-2004 Unicode, Inc.
License: Unicode
This source code is provided as is by Unicode, Inc. No claims are
made as to fitness for any particular purpose. No warranties of any
kind are expressed or implied. The recipient agrees to determine
applicability of information provided. If this file has been
purchased on magnetic or optical media from Unicode, Inc., the
sole remedy for any claim will be exchange of defective media
within 90 days of receipt.
.
Limitations on Rights to Redistribute This Code
.
Unicode, Inc. hereby grants the right to freely use the information
supplied in this file in the creation of products supporting the
Unicode Standard, and to make copies of this file in any form
for internal or external distribution as long as this notice
remains attached.
openalpr_2.2.4.orig/distros/debian/docs 0000664 0000000 0000000 00000000022 12664642524 0020151 0 ustar 00root root 0000000 0000000 cla.txt
README.md
openalpr_2.2.4.orig/distros/debian/libopenalpr-data.install 0000664 0000000 0000000 00000000073 12664642524 0024112 0 ustar 00root root 0000000 0000000 etc/openalpr/openalpr.conf
usr/share/openalpr/runtime_data
openalpr_2.2.4.orig/distros/debian/libopenalpr-dev.install 0000664 0000000 0000000 00000000061 12664642524 0023754 0 ustar 00root root 0000000 0000000 usr/include/alpr.h
usr/lib/lib*.a
usr/lib/lib*so
openalpr_2.2.4.orig/distros/debian/libopenalpr2.install 0000664 0000000 0000000 00000000022 12664642524 0023257 0 ustar 00root root 0000000 0000000 usr/lib/lib*.so.*
openalpr_2.2.4.orig/distros/debian/openalpr-daemon.default 0000664 0000000 0000000 00000001067 12664642524 0023737 0 ustar 00root root 0000000 0000000 # Defaults for alprd initscript
# sourced by /etc/init.d/openalpr-daemon
# installed at /etc/default/openalpr-daemon by the maintainer scripts
#
# This is a POSIX shell fragment
#
# These options can be set to modify the behavior of the openalr-daemon init script.
# The options commented out show the default values.
# Start the daemon if set to "yes"
START_DAEMON="yes"
# Path to the log file
#LOGFILE="/var/log/alpr.log"
# User and group the daemon should run as
#USER="daemon"
#GROUP="daemon"
# Additional options that are passed to the daemon
#DAEMON_OPTS=
openalpr_2.2.4.orig/distros/debian/openalpr-daemon.dirs 0000664 0000000 0000000 00000000036 12664642524 0023247 0 ustar 00root root 0000000 0000000 var/lib/openalpr/plateimages/
openalpr_2.2.4.orig/distros/debian/openalpr-daemon.init 0000664 0000000 0000000 00000010345 12664642524 0023255 0 ustar 00root root 0000000 0000000 #!/bin/sh
### BEGIN INIT INFO
# Provides: openalpr-daemon
# Required-Start: $local_fs $network $remote_fs $syslog
# Required-Stop: $local_fs $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: OpenALPR daemon for license plate recognition
# Description: OpenALPR daemon detects license plate in the background
### END INIT INFO
# Author: Emmanuel Papin
unset USER
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="OpenALPR daemon"
NAME=openalpr-daemon
DAEMON=/usr/bin/alprd
PIDFILE=/var/run/alprd.pid
SCRIPTNAME=/etc/init.d/$NAME
DEFAULT=/etc/default/$NAME
USER=openalpr
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r $DEFAULT ] && . $DEFAULT
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions
# Do not start the daemon if NO_START is enabled in DEFAULT
if [ "$START_DAEMON" != "yes" ] && [ "$1" != "stop" ]; then
log_warning_msg "$NAME: Not starting $DESC."
log_warning_msg "$NAME: Disabled in $DEFAULT."
exit 0
fi
# Set the default log file
if [ -z $LOGFILE ]; then
LOGFILE=/var/log/alpr.log
fi
# Run as `daemon' if USER is not specified or is `root'
if [ -z $USER ]; then
USER=daemon
fi
# If no group is specified, use USER
if [ -z $GROUP ]; then
GROUP=$USER
fi
DAEMON_ARGS="-l $LOGFILE $DAEMON_OPTS"
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
[ ! -f $LOGFILE ] && touch $LOGFILE && chown $USER:$GROUP $LOGFILE
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--chuid $USER:$GROUP --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--chuid $USER:$GROUP --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
[ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
return 0
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac
:
openalpr_2.2.4.orig/distros/debian/openalpr-daemon.install 0000664 0000000 0000000 00000000046 12664642524 0023755 0 ustar 00root root 0000000 0000000 etc/openalpr/alprd.conf
usr/bin/alprd
openalpr_2.2.4.orig/distros/debian/openalpr-daemon.postinst 0000664 0000000 0000000 00000000626 12664642524 0024176 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -e
# Source debconf library.
. /usr/share/debconf/confmodule
# Create openalpr:openalpr if it doesn't already exist
USER=openalpr
GROUP=openalpr
getent group $GROUP >/dev/null || addgroup $GROUP >/dev/null
getent passwd $USER >/dev/null || adduser --system --no-create-home --home /nonexistent $USER >/dev/null
chown openalpr:openalpr /var/lib/openalpr/plateimages
#DEBHELPER#
db_stop
openalpr_2.2.4.orig/distros/debian/openalpr-utils.install 0000664 0000000 0000000 00000000263 12664642524 0023653 0 ustar 00root root 0000000 0000000 usr/bin/openalpr-utils-classifychars
usr/bin/openalpr-utils-benchmark
usr/bin/openalpr-utils-prepcharsfortraining
usr/bin/openalpr-utils-tagplates
usr/bin/openalpr-utils-calibrate openalpr_2.2.4.orig/distros/debian/openalpr.install 0000664 0000000 0000000 00000000015 12664642524 0022510 0 ustar 00root root 0000000 0000000 usr/bin/alpr
openalpr_2.2.4.orig/distros/debian/openalpr.manpages 0000664 0000000 0000000 00000000017 12664642524 0022637 0 ustar 00root root 0000000 0000000 doc/man/alpr.1
openalpr_2.2.4.orig/distros/debian/patches/ 0000775 0000000 0000000 00000000000 12664642524 0020733 5 ustar 00root root 0000000 0000000 openalpr_2.2.4.orig/distros/debian/patches/series 0000664 0000000 0000000 00000000000 12664642524 0022136 0 ustar 00root root 0000000 0000000 openalpr_2.2.4.orig/distros/debian/python-openalpr.install 0000664 0000000 0000000 00000000050 12664642524 0024026 0 ustar 00root root 0000000 0000000 usr/lib/python2.7/dist-packages/openalpr openalpr_2.2.4.orig/distros/debian/rules 0000775 0000000 0000000 00000005754 12664642524 0020377 0 ustar 00root root 0000000 0000000 #!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#DH_VERBOSE = 1
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
# DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
#
# These are used to get the most recent version of the original sources from github
UURL = $(shell git config --get remote.origin.url)
BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
HEAD = $(shell git rev-parse HEAD)
PKD = $(shell pwd)/debian
PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
DTYPE =
TARBALL = ../$(PKG)_$(VER)$(DTYPE).orig.tar.xz
# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
# main packaging script based on dh7 syntax
%:
dh $@ --sourcedirectory=src --with quilt,python2,python3
override_dh_auto_configure:
dh_auto_configure -- \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_VERBOSE_MAKEFILE=OFF \
-DCMAKE_COLOR_MAKEFILE=ON
override_dh_auto_install:
dh_auto_install
cd $(CURDIR)/src/bindings/python ; python3 ./setup.py install --install-layout=deb --root $(CURDIR)/debian/python3-openalpr
override_dh_auto_clean:
dh_auto_clean
rm -rf $(CURDIR)/src/bindings/python/build
# Inspired by https://wiki.debian.org/onlyjob/get-orig-source
.PHONY: get-orig-source
get-orig-source: $(TARBALL) $(info I: $(PKG)_$(VER)$(DTYPE))
@
$(TARBALL):
$(if $(wildcard $(PKG)-$(VER)),$(error folder '$(PKG)-$(VER)' exists, aborting...))
@echo "# Cloning origin repository..."; \
if ! git clone $(UURL) $(PKG)-$(VER); then \
$(RM) -r $(PKG)-$(VER); \
echo "failed to clone repository, aborting..."; \
false; \
fi
@if [ $(BRANCH) != "master" ]; then \
cd $(PKG)-$(VER); \
echo "# Not on master branch, fetching origin branch '$(BRANCH)'..."; \
git fetch origin $(BRANCH):$(BRANCH) || false; \
echo "# Switching to branch '$(BRANCH)'..."; \
git checkout $(BRANCH) || false; \
fi
@echo "# Checking local source..."
@if [ $$(cd $(PKG)-$(VER) && git rev-parse HEAD) = $(HEAD) ]; then \
echo "even with origin, ok"; \
true; \
else \
echo "not even with origin, aborting..."; \
false; \
fi
@echo "# Setting times..."
@cd $(PKG)-$(VER) \
&& for F in $$(git ls-tree -r --name-only HEAD | sed -e "s/\s/\*/g"); do \
touch --no-dereference -d "$$(git log -1 --format="%ai" -- $$F)" "$$F"; \
done
@echo "# Cleaning-up..."
cd $(PKG)-$(VER) && $(RM) -r .git
@echo "# Packing file '$(TARBALL)'..."
@find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
| XZ_OPT="-6v" tar -caf "$(TARBALL)" -T- --owner=root --group=root --mode=a+rX \
&& $(RM) -r "$(PKG)-$(VER)"
openalpr_2.2.4.orig/distros/debian/source/ 0000775 0000000 0000000 00000000000 12664642524 0020604 5 ustar 00root root 0000000 0000000 openalpr_2.2.4.orig/distros/debian/source/format 0000664 0000000 0000000 00000000014 12664642524 0022012 0 ustar 00root root 0000000 0000000 3.0 (quilt)
openalpr_2.2.4.orig/distros/debian/source/local-options 0000664 0000000 0000000 00000000052 12664642524 0023307 0 ustar 00root root 0000000 0000000 unapply-patches
abort-on-upstream-changes
openalpr_2.2.4.orig/doc/ 0000775 0000000 0000000 00000000000 12664642524 0015140 5 ustar 00root root 0000000 0000000 openalpr_2.2.4.orig/doc/generate 0000775 0000000 0000000 00000000202 12664642524 0016652 0 ustar 00root root 0000000 0000000 #!/bin/bash
make -f makefile clean && make -f makefile html
cp -R swagger/ build/html/api
cp source/*.yaml build/html/api/specs/
openalpr_2.2.4.orig/doc/generate.bat 0000775 0000000 0000000 00000016131 12664642524 0017427 0 ustar 00root root 0000000 0000000 @ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
set I18NSPHINXOPTS=%SPHINXOPTS% source
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^` where ^ is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. xml to make Docutils-native XML files
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
echo. coverage to run coverage check of the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
REM Check if sphinx-build is available and fallback to Python version if any
%SPHINXBUILD% 2> nul
if errorlevel 9009 goto sphinx_python
goto sphinx_ok
:sphinx_python
set SPHINXBUILD=python -m sphinx.__init__
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
:sphinx_ok
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\openalpr.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\openalpr.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
if "%1" == "coverage" (
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
if errorlevel 1 exit /b 1
echo.
echo.Testing of coverage in the sources finished, look at the ^
results in %BUILDDIR%/coverage/python.txt.
goto end
)
if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in %BUILDDIR%/xml.
goto end
)
if "%1" == "pseudoxml" (
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
goto end
)
:end
openalpr_2.2.4.orig/doc/makefile 0000775 0000000 0000000 00000016402 12664642524 0016646 0 ustar 00root root 0000000 0000000 # Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
help:
@echo "Please use \`make ' where is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/openalpr.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/openalpr.qhc"
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/openalpr"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/openalpr"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
openalpr_2.2.4.orig/doc/man/ 0000775 0000000 0000000 00000000000 12664642524 0015713 5 ustar 00root root 0000000 0000000 openalpr_2.2.4.orig/doc/man/alpr.1 0000664 0000000 0000000 00000012403 12664642524 0016733 0 ustar 00root root 0000000 0000000 .TH "openalpr" "1" "10 May 2014" "" ""
.SH "NAME"
OpenALPR \- Automatic License Plate Recognition Library
.SH "SYNOPSIS"
.PP
.nf
Plate detection: alpr [OPTION...] [IMAGE_PATH]
.fi
.SH "DESCRIPTION"
.PP
OpenALPR is an open source Automatic License Plate Recognition library written
in C++. The library analyzes images and identifies license plates. The output
is the text representation of any license plate characters found in the image.
.PP
Check out a live online demo here: http://www.openalpr.com/demo.html
.PP
OpenALPR supports license plates from the USA as well as number plates from Europe.
The library can also be used to identify plates from other countries. By training
the library, the accuracy for these other countries can be increased.
.SH "USAGE"
.PP
alpr [\-c ] [\-\-config ] [\-n ] [\-\-seek
] [\-p ] [\-\-clock] [\-d] [\-j] [\-\-]
[\-\-version] [\-h]
Where:
\-c , \-\-country
Country code to identify (either us for USA or eu for Europe).
Default=us
\-\-config
Path to the openalpr.conf file
\-n , \-\-topn
Max number of possible plate numbers to return. Default=10
\-\-seek
Seek to the specified millisecond in a video file. Default=0
\-p , \-\-pattern
Attempt to match the plate number against a plate pattern (e.g., md
for Maryland, ca for California)
\-\-clock
Measure/print the total time to process image and all plates.
Default=off
\-d, \-\-detect_region
Attempt to detect the region of the plate image. [Experimental]
Default=off
\-j, \-\-json
Output recognition results in JSON format. Default=off
\-\-, \-\-ignore_rest
Ignores the rest of the labeled arguments following this flag.
\-\-version
Displays version information and exits.
\-h, \-\-help
Displays usage information and exits.
Image containing license plates
.SH "EXAMPLES"
.PP
.RS
.PP
\f(CW$ alpr \-c eu /source/image.jpg
.RE
.PP
This command will attempt to recognize number plates in the /source/image.jpg
image using the European\-style recognition data.
The config file is not provided on the CLI, so it will use the value in
the environment variable 'OPENALPR_CONFIG_FILE' if provided, or the default location.
.PP
.RS
\f(CW$ alpr \-\-config /tmp/openalpr.conf /source/image.png
.RE
.PP
This command will attempt to recognize number plates in the /source/image.png
image using the default USA\-style recognition data.
The config file is not provided on the CLI, so it will read the configuration data
from /tmp/openalpr.conf
.PP
.RS
\f(CW$ alpr -c us *.jpg
.RE
.PP
This command will attempt to recognize number plates in all jpeg images in the current directory
image using the USA\-style recognition data.
.PP
.RS
\f(CW$ alpr \-j /source/video.mp4
.RE
.PP
This command reads data from an input video (/source/video.mp4) and outputs
recognition data as JSON.
.PP
.RS
\f(CW$ alpr \-j stdin < /source/imagefilelist.txt > /out/recognitionresults.txt
.RE
.PP
This command processes a list of image files provided in /source/imagefilelist.txt
and writes JSON results to /out/recognitionresults.txt.
.PP
.RS
\f(CW$ alpr webcam
.RE
.PP
This command processes video from your webcam. You can also use /dev/video0, /dev/video1, etc.
if you have multiple webcams.
.PP
.RE
.SH "DIAGNOSTICS"
.PP
License plate recognition software can never achieve 100% accuracy. In cases where the
plate is not recognized correctly, there is diagnostic information available. You
can modify the openalpr.conf file to turn "debug" information on.
.PP
In the [debug] section toggle the various debug options to enabled by changing the '0'
value to a '1'. Some of these options will output text to the CLI and others may output
images to the GUI.
.SH "BUGS"
.PP
Please report bugs! See the web site at
https://github.com/openalpr/openalpr/issues
.PP
.SH "CREDITS"
.PP
OpenALPR is distributed under the GNU Affero General Public License version 3.
See the file LICENSE for details.
.PP
The OpenALPR site is available at: http://www.openalpr.com/.
.PP
We would be delighted to hear about the creative ways that you are using this program.
Please contact the mailing\-list at openalpr@googlegroups.com.
.PP
This program uses the following libraries:
.IP *
OpenCV \- Computer vision (http://www.opencv.org)
.IP *
Tesseract \- Optical Character Recognition (https://code.google.com/p/tesseract\-ocr)
.IP *
T\-Rex \- Regular Expression processing (http://tiny\-rex.sourceforge.net)
.IP *
TinyThread++ \- Multi\-threaded analysis (http://tinythreadpp.bitsnbites.eu)
.IP *
TClap \- CLI Argument parsing (http://tclap.sourceforge.net)
.IP *
SimpleINI \- INI file configuration (https://github.com/brofield/simpleini)
.PP
.SH "THANKS"
.PP
Special thanks go out to: Stefan Bauer, Philippe Vaucher, Kristians Vebers, and
all contributors to the project.
.SH "AUTHOR"
.PP
OpenALPR is written and maintained by Matthew Hill (matthill@openalpr.com)
and contributors from the open source community.
.PP
Mailing lists for support and development are available at
https://groups.google.com/forum/#!forum/openalpr
openalpr_2.2.4.orig/doc/requirements.txt 0000775 0000000 0000000 00000000317 12664642524 0020430 0 ustar 00root root 0000000 0000000 Babel==2.1.1
Jinja2==2.8
MarkupSafe==0.23
Pygments==2.0.2
Sphinx==1.3.1
alabaster==0.7.6
argparse==1.2.1
docutils==0.12
pytz==2015.7
six==1.10.0
snowballstemmer==1.2.0
sphinx-rtd-theme==0.1.9
wsgiref==0.1.2
openalpr_2.2.4.orig/doc/source/ 0000775 0000000 0000000 00000000000 12664642524 0016440 5 ustar 00root root 0000000 0000000 openalpr_2.2.4.orig/doc/source/accuracy_improvements.rst 0000664 0000000 0000000 00000056271 12664642524 0023607 0 ustar 00root root 0000000 0000000 ************************
Accuracy Improvements
************************
Calibration
=============
Calibrating your camera improves detection accuracy in cases where vehicle plates are captured at a steep angle. For example, the the plate below is captured at 40+ degree horizontal angle, and will normally not be recognized as a license plate.
.. image:: images/configuration_calibration_before.jpg
:scale: 100%
:alt: Calibration before adjustments
The camera calibration helps in cases where the camera is capturing from a fixed position, and all plates generally are seen at the same angle. This feature is best for short-angle cameras or cameras capturing at a close distance.
Use the tool named "openalpr-utils-calibrate" to calibrate your camera. The utility needs a single example image to begin. This image should be taken from the camera you wish to calibrate and should have a license plate that represents the typical distance/angle of plate captured on this camera.
./openalpr-utils-calibrate camera_image.jpg
There are sliders at the top of the screen that control the skew. Adjust the sliders until the plate looks like it is seen from straight-on with no angle. Left-click and drag to draw a box (with the correct aspect ratio) to test if the plate is the correct size.
You can also right-click and drag to move the image within the frame. Because we are distorting the original image, the frame will be clipped. If frames are unlikely to be seen in certain areas (on the ceiling for example) you may want to adjust the plate image to ensure that those areas will be cropped.
.. image:: images/configuration_calibration_tool.jpg
:scale: 100%
:alt: Calibration utility
Once you're satisified with the parameters you've chosen, press the 'o' key. This produces a line of configuration in the terminal that can be copied directly into openalpr.conf as the "prewarp" config. This will apply the camera calibration settings against each image before it is used for plate recognition.
Now test the new settings on a few images from this camera to make sure that the new calibration improves accuracy.
./alpr camera_image.jpg
.. image:: images/configuration_calibration_after.jpg
:scale: 100%
:alt: Calibration after adjustments
Notice that the license plate is now correctly detected. You can view the calibrated image results by enabling the "prewarp" debug option in the openalpr.conf file. Test the accuracy on many different images from the camera before accepting the configuration. Other calibration angles could produce superior results.
Pattern Matching
===================
The pattern matching feature runs the topN results against a Regular expression matcher to find results that match common license plate patterns. The regex patterns are customizable and can be found in runtime_data/postprocess/``*``.patterns
For example, using a pattern against this Czechoslovakian plate results in only one possible match (which is the correct one).
.. image:: images/configuration_patternmatch.jpg
:scale: 100%
:alt: Czechoslovakian number plate
The cz patterns are:
- cz #@#####
- cz #@@####
Results for this plate, notice the pattern matches 4S50233:
::
[mhill@mhill-linux tmp]$ alpr -c eu -p cz cz_4s50233.jpg -n 40
plate0: 40 results
- 4S5O233 confidence: 90.947 pattern_match: 0
- 4S5O23 confidence: 87.8683 pattern_match: 0
- 4S5O23 confidence: 85.1644 pattern_match: 0
- 4S5O23S confidence: 84.5445 pattern_match: 0
- 4S5O23B confidence: 83.7395 pattern_match: 0
- 4S5O2S3 confidence: 83.3698 pattern_match: 0
- 4S5O23G confidence: 83.1375 pattern_match: 0
- 4S50233 confidence: 83.0457 pattern_match: 1
- 4S5O2B3 confidence: 82.5635 pattern_match: 0
- 4S5O2 confidence: 82.0857 pattern_match: 0
- 4S5O2G3 confidence: 81.5684 pattern_match: 0
- 4S5O2J3 confidence: 81.0409 pattern_match: 0
- 4S5O2S confidence: 80.2911 pattern_match: 0
... more results that do not match ...
You can utilize this from the library code by calling "setDefaultRegion(string region)" with the name of the pattern you wish to use:
Configuration
=================
The OpenALPR library is configured with the openalpr.conf file. On Linux, this is typically located in /etc/openalpr/openalpr.conf. On Windows, it is usually in the same directory as the binary. Many of the configuration options in this file are documented with comments.
Training OCR
===============
Training the OpenALPR OCR is a quick way to improve the accuracy for a particular country. To do this, you will need:
1. Around 200 clear images of your country's license plates.
2. 16 hours of free time
`This code repository `_ provides code and data that can be used to train custom license plate fonts in support of the OpenALPR library.
The OCR library used by OpenALPR is Tesseract. Many of the tedious aspects of OCR training have been automated via a Python script. However, the input data still needs to be in a specific format to satisfy Tesseract.
For more information about training using Tesseract OCR, please read this tutorial: https://code.google.com/p/tesseract-ocr/wiki/TrainingTesseract3
To get started, first clone the repository and get familiar with the input files. In the "eu/input" folder, there are a number of tif files and box files. Each "font" will have at least one tif and box file. A country's license plate may have many fonts, each one would just use a different name.
The naming convention is:
l[country_code].[fontname].exp[pagenumber].box
For example, the European German license plate font would look like:
leu.germany.exp0.box
Open up a tif file. Notice, these are a series of similar looking letters and numbers. The best way to generate these is from actual license plate images. OpenALPR has a couple utilities to help generate these input files. The first step is to find many pictures of your license plates. Make sure to separate them by font. Sometimes, even within a single region, the license plate fonts will vary (e.g., between old plates and new plates, or digital vs stamped plates, or vehicle plates vs bicycle plates). Each unique font should be a different file in order to achieve the highest accuracy.
Adding a new Country
--------------------
If you plan on training OCR for a completely new country, you will first need to configure the dimensions of the plate and characters. Add a new file in runtime_data/config/ with your country's 2-digit code. You can copy and paste a section from another country (e.g., us or eu).
You should tweak the following values:
- plate_width_mm = [width of full plate in mm]
- plate_height_mm = [height of full plate in mm]
- char_width_mm = [width of a single character in mm]
- char_height_mm = [height of a single character in mm]
- char_whitespace_top_mm = [whitespace between the character and the top of the plate in mm]
- char_whitespace_bot_mm = [whitespace between the character and the bottom of the plate in mm]
- template_max_width_px = [maximum width of the plate before processing. Should be proportional to the plate dimensions]
- template_max_height_px = [maximum height of the plate before processing. Should be proportional to the plate dimensions]
- min_plate_size_width_px = [Minimum size of a plate region to consider it valid.]
- min_plate_size_height_px = [Minimum size of a plate region to consider it valid.]
- ocr_language = [name of the OCR language -- typically just the letter l followed by your country code]
Understanding Your Country's Plates
------------------------------------
The first thing you need to know is how many fonts your country's license plates have. In the US, for example, many states use very different fonts for their plates. Some countries only use one font. Here is an example of New York and West Virginia,. Notice how different the "6" character is in both plates:
.. image:: images/training_ocr_plateny.png
:scale: 100%
:alt: west virginia license plate
.. image:: images/training_ocr_platewv.png
:scale: 100%
:alt: new york license plate
Each font needs to be trained separately. You do not want to combine characters across fonts, this will greatly decrease your accuracy. After each font is trained, they can be combined into one dataset for your entire country.
Creating the character tiles
----------------------------
Once you're ready to start training, you'll need to create a library of character tiles. Each tile is a small image file that contains the black-and-white character and is named after the character. For example, here are a few character tile examples:
.. image:: images/training_ocr_char1.png
:scale: 100%
:alt: character tile 1
부-0-0-2.png
.. image:: images/training_ocr_char2.png
:scale: 100%
:alt: character tile 2
0-0-az2012.png
.. image:: images/training_ocr_char3.png
:scale: 100%
:alt: character tile 3
c-1-az2012.png
.. image:: images/training_ocr_char4.png
:scale: 100%
:alt: character tile 4
d-9-az2012.jpg
.. image:: images/training_ocr_char5.png
:scale: 100%
:alt: character tile 5
d-9-2-az2012.jpg
You will want many of these character tiles for each character and each font. The character tiles are all going to be slightly different, this is necessary for the OCR training to understand how to detect characters. Notice in the above examples, the "D" characters have pixels located in different places, but they're clearly the same character.
Producing Tiles
----------------
There are two good ways to produce character tiles.
1. Use actual images from license plates
2. Use a TTF font that looks like the license plate font
Producing Tiles from Actual Plates
------------------------------------
You should gather a large library of license plate images (At least 100). These license plate images should be cropped around the plate and the aspect ratio should match your configured width/height for your license plates. Make sure each image is at least 250px wide. The imageclipper program (separate repo) is helpful for quickly cropping large numbers of images. Save them as png files.
Each file should be prefaced with a two character identifier for the font/region. For example, for Maryland plates, we would name the file: **md**\ plate1.png
Create an empty output directory.
To start classifying characters, use the classifychars utility program included in OpenALPR.
Execute the command:
classifychars [country] [input image directory] [empty output directory]
A GUI will open up and analyze each license plate image in your input folder. The steps to classify each plate are:
1. Press the "Enter" key and type the letter or number for each position that you wish to classify. Pressing 'Space' will skip the character.
2. Use the arrow keys and press 'Space' to select the rendering that you wish to extract characters for. The box will be highlighted in blue if it is selected. For each plate, there may be good characters and bad characters. You want to pick the best characters, since significant imperfections may confuse the OCR.
3. Press the 's' key to save each character as a separate file in your out folder.
4. Press the 'n' key to move onto the next plate and repeat this process until you've classified all the plates.
Producing Tiles from a TTF Font
-------------------------------
A TTF font can be used to produce tiles. However, we need to add some realistic distortion to the characters. This is necessary to make a robust OCR detector.
The process is as follows:
1. Figure out all the characters that could possibly be in a license plate.
2. Create a word document with all of these characters. Make sure there is plenty of spacing between lines and characters.
3. Copy and paste all of these characters to a text file (no spaces or line breaks)
4. Print this word document.
5. Take a few pictures (5 would be sufficient) of the word document with a digital camera. Vary the angle/rotation very slightly (1-2 degrees) with each picture.
6. Save the pictures to a folder.
7. Run the openalpr-utils-binarizefontsheet program to produce tiles from each of the images. Provide the program with the text file from step #3 and each image file.
Building a Tesseract Training Sheet
-----------------------------------
Once you've classified all the characters, it may be a good idea to scan through the directory to make sure that the classifications match the images. Each image filename should be prefaced with the character that it represents. Once you've done this, it's time to create a training sheet.
The "openalpr-utils-prepcharsfortraining" utility program in OpenALPR will create the Tesseract training sheet for you. Execute the following command:
openalpr-utils-prepcharsfortraining [output directory from above]
The output will be:
- combined.box
- combined.tif
Rename these files to match the naming convention used by Tesseract (explained above). For example, leu.germany.exp0.box
You should create a training sheet for each unique license plate font that you wish to train.
Finish OCR Training
---------------------
Lastly, you'll use the box/tif files created above to train your country's license plate OCR. Create a new directory using your country code, and create an input directory within it. Copy all the box/tif files created in the previous steps into this directory.
Execute the "train.py" file. Type in your country code.
If all went well, you should have a new file named l[countrycode].traineddata. Copy this file into your runtime_directory (runtime_data/ocr/tessdata/) and it is now ready for OpenALPR to use.
Tesseract may report issues. Most commonly it will complain that it could not line up the boxes on the provided image. If you are getting many of these warnings, you can re-run the openalpr-utils-prepcharsfortraining utility and provide values for --tile_width and --tile_height. Using different values will change how Tesseract sees the image and potentially improve results.
Training the Detector
========================
The detector finds the general location of a license plate in an image. A single detector can support many different plate styles, as long as they generally have the same aspect ratio. For example, in the USA, license plates are 12 inches by 6 inches (i.e., an aspect ratio of 2:1).
To train a license plate detector, you will need:
1. 3000+ clear images of license plates
2. 40-60 hours of free time
`This repository `_ contains scripts that will help train a license plate detector for a particular region. Your trained region detector can then be used in OpenALPR.
The license plate region detector uses the Local Binary Pattern (LBP) algorithm. In order to train the detector, you will need many positive and negative images. This repository already contains a collection of negative images. You will need to add your own positive images.
To get started, you will first need many cropped plate images containing positive license plate matches. Please see the "eu" positive image folder in this repository to understand the types of plate images required. The imageclipper program is helpful for creating these cropped images.
After you've collected many (hundreds to thousands) of positive plate images, the next step is to train the detector. First you must configure the training script to use the correct dimensions.
Edit the prep.py script and change the WIDTH, HEIGHT, and COUNTRY variables to match the country that you are training. The width and height should be proportional to the plate size (slightly larger is OK). A total pixel area of around 650 seems to work best. Also, adjust the path to your OpenCV libraries, if that needs to be changed.
Once you are ready to start training, enter the following commands:
- rm ./out/``*`` (clear the out folder in case it has data from previous runs)
- ./prep.py neg
- ./prep.py pos
- ./prep.py train
- Copy the output from the above command onto the command line. You should adjust the numStages to a smaller value (usually 12 stages works well, but it will depend on your input images). You may also need to adjust the numPos value to a smaller number in order to complete the training.
Copy the out/cascade.xml file to your OpenALPR runtime directory (runtime_data/region/[countrycode].xml). You should now be able to use the region for plate detection.
Developers Guide
=================
Accuracy can also be improved by modifying the recognition code, itself. The OpenALPR library is binary-compatible with the commercial software. Any improvements/modifications you make can be swapped in by replacing the openalpr.dll/libopenalpr.so with your modified version. The information below describes the various stages involved in recognizing license plates.
OpenALPR Design
----------------
OpenALPR operates as a pipeline. The input is an image, various processing occurs in stages, and the output is the possible plate numbers in the image.
The pipeline stages occur in the following order:
======================= ===================================== ==============================================================================================
Pipeline Phase C++ class Description
======================= ===================================== ==============================================================================================
Detection regiondetector.cpp Finds potential license plate regions
Binarization binarizewolf.cpp Converts the plate region image into black and white
Char Analysis characteranalysis.cpp Finds character-sized "blobs" in the plate region
Plate Edges platelines.cpp and platecorners.cpp Finds the edges/shape of the license plate
Deskew licenseplatecandidate.cpp Transforms the perspective to a straight-on view based on the ideal license plate size.
Character Segmentation charactersegmenter.cpp Isolates and cleans up the characters so that they can be processed individually
OCR ocr.cpp Analyzes each character image and provides multiple possible letters/confidences
Post Processing postprocess.cpp Creates a top n list of plate possibilities based on OCR confidences.
Also performs a Regex match against region templates if requested.
======================= ===================================== ==============================================================================================
Detection
---------
The detection phase happens one time for each input image. It uses the LBP algorithm (generally used for face detection) to find possible license plate regions (x,y, width, height). Each of these regions is sent to the later pipeline phases for further processing.
The detection phase is usually the most processing-intensive phase. It can be GPU accelerated to improve performance.
Binarization
------------
This phase (and all subsequent phases) occur multiple times -- once for each possible license plate region.
The binarization phase creates multiple binary images for each plate region. The reason multiple binary images are used is to give us the best possible chance of finding all the characters. A single binarized image may miss characters if the image is too dark or too light for example. Binarization uses the Wolf-Jolien method as well as the Sauovola method with various parameters. Each of the binary images are processed in subsequent phases.
Character Analysis
------------------
Character analysis attempts to find character-sized regions in the plate region. It does this by first finding all connected blobs in the license plate region. Then it looks for blobs that are roughly the width and height of a license plate character and have tops/bottoms that are in a straight line with other blobs of similar width/height.
This analysis is done multiple times in the region. It starts by looking for small characters, then gradually looks for larger characters.
If nothing is found in the region, then the region is thrown out and no further processing takes place. If it finds some potential characters, then the character region is saved and further processing takes place.
Plate Edges
-----------
The next phase is to find the edges of the license plate. Keep in mind that the detection phase is only responsible for identifying a possible region where a license plate may exist. It often is going to provide a region that is a little larger or smaller than the actual plate. The plate edges tries to find the precise top/bottom/left/right edges of the license plate.
The first step is to find all of the hough lines for the license plate region. platelines.cpp processes the plate image and computes a list of horizontal and vertical lines.
platecorners uses this list as well as the character height (computed in Character Analysis) to find the likeliest plate line edges. It uses a number of configurable weights to determine which edge makes the most sense. It will try using a default edge (based on the ideal width/height of the plate) to see if that makes a good match.
Deskew
------
Given the plate edges, the deskew stage remaps the plate region to a standard size and orientation. Ideally this will give us a correctly oriented plate image (no rotation or skew).
Character Segmentation
----------------------
The character segmentation phase tries to isolate all the characters that make up the plate image. It uses a vertical histogram to find gaps in the plate characters. This phase also cleans up the character boxes by removing small, disconnected speckles and disqualifying character regions that are not tall enough. It also tries to remove "edge" regions so that the edge of the license plate doesn't inappropriately get classified as a '1' or an 'I'
OCR
---
The OCR phase analyzes each character independently. For each character image, it computes all possible characters and their confidences.
Post Processing
---------------
Given a list of all possible OCR characters and confidences, post processing determines the best possible plate letter combinations. It is organized as a top N list. Post processing disqualifies all characters below a particular threshold. It also has a "soft" thresholds -- characters that are below this threshold will still be added to the possible list, but they also add a possible blank character -- since it's possible that the low confidence character is not really part of the plate.
The post processing also handles region validation if requested. For example, if I tell OpenALPR that this is a "Missouri" plate, then it will try and match the results against a template that matches the Missouri format (e.g., [char][char][number]-[char][number][char]). So, for example, if the top 3 list was:
- CFOCIG
- CF0CIG
- CF0C1G
The third entry matches the template, but the other two do not. So, post processing will signal that the third entry is our best match.
openalpr_2.2.4.orig/doc/source/alprd.rst 0000775 0000000 0000000 00000050262 12664642524 0020304 0 ustar 00root root 0000000 0000000 .. _alprd:
************************
OpenALPR Agent (alprd)
************************
The OpenALPR daemon allows you to monitor a camera stream for license plate numbers in the background. Alprd runs as a daemon process on Linux. The plate numbers can be streamed to another server (via HTTP posts) or can be consumed programmatically via a beanstalkd queue.
Architecture
=============
Alprd operates as follows:
1. The image stream is constantly pulled from the IP camera via MJPEG over HTTP
2. alprd processes the stream as fast as it can looking for plate images. The daemon automatically skips frames to stay in-sync with clock time.
3. When one or more plates are detected, the information is written to a local beanstalkd queue (tube name is alprd) as JSON data.
4. Optionally, alprd will also save the image as a jpeg and save it to a configurable location.
5. Optionally, alprd also runs a separate process that drains the beanstalkd queue and uploads data to a remote HTTP server via POST.
Alprd can be used in two modes:
1. Recognition results are streamed to an HTTP server
2. Recognition results can be read from the beanstalkd queue
::
+------------------+ +-------------+
| | MJPEG POST | |
| Network Camera | <---+ +------> | HTTP Server |
| | | | | |
+------------------+ | | +-------------+
| |
| |
| |
+-------+------+
| |
| alprd server |
| |
+---------+----+------------+
| |
| Beastalkd queue |
| |
+-----------------+
The diagram above shows alprd being used to stream data to another HTTP server. alprd is configured with a remote HTTP address. As plates are identified, the server sends the JSON data to the remote HTTP server. The beanstalkd queue and the alprd process are colocated on the same server.
::
+------------------+
| | MJPEG
| Network Camera | <---+
| | |
+------------------+ |
| +----------+
| |Processing|
| +----+-----+
+-------+------+ |
| | |
| alprd server | |
| | |
+---------+----+------------+ |
| | |
| Beastalkd queue | <------+
| |
+-----------------+
The diagram above shows alprd being used without the HTTP server. In this case, a beanstalkd consumer can be used to drain the results from the beanstalkd queue. The beanstalkd tube name is "alprd." Beanstalkd consumers can be written in any language, and can be colocated on the alprd server or located elsewhere.
Open Source Agent
====================
Configuration
-------------
.. code-block:: ini
[daemon]
; Declare each stream on a separate line
; each unique stream should be defined as stream = [url]
stream = http://10.1.2.3/camera1/stream.mjpeg
stream = http://10.1.2.5/camera2/stream.mjpeg
site_id = headquarters-usa
store_plates = 1
store_plates_location = /var/www/html/plates/
; upload address is the destination to POST to
upload_data = 0
upload_address = http://localhost:9000/alpr/push/
alprd needs at least one "stream" defined. This is just the URL for the mjpeg stream. You may use multiple streams on one server -- each stream spawns a separate process that attempts to use a full CPU core.
The site-id will be stored along with the JSON plate results. This is especially useful if you have multiple servers and need to keep track of where the results are coming from. Additionally, each result will contain a camera ID (numbered 1 to n) based on the order of your "stream" statements in the alprd.conf file
Results
---------
The following is an example of the JSON results. These results are initially stored in the beanstalkd queue, and then optionally sent in an HTTP post.
.. code-block:: json
{
"uuid": "f11e0acc-6aaf-4817-9299-9e6773043b8e",
"camera_id": 1,
"site_id": "headquarters",
"img_width": 640,
"img_height": 480,
"epoch_time": 1402161050,
"processing_time_ms": 138.669163,
"results": [
{
"plate": "S11FRE",
"confidence": 77.130661,
"matches_template": 0,
"region": "",
"region_confidence": 0,
"coordinates": [
{
"x": 218,
"y": 342
},
{
"x": 407,
"y": 325
},
{
"x": 407,
"y": 413
},
{
"x": 218,
"y": 431
}
],
"candidates": [
{
"plate": "S11FRE",
"confidence": 77.130661,
"matches_template": 0
},
{
"plate": "S11ERE",
"confidence": 75.496307,
"matches_template": 0
},
{
"plate": "S11RE",
"confidence": 75.440361,
"matches_template": 0
},
{
"plate": "S11CRE",
"confidence": 75.340179,
"matches_template": 0
},
{
"plate": "S11FHE",
"confidence": 75.240974,
"matches_template": 0
},
{
"plate": "S11EHE",
"confidence": 73.606621,
"matches_template": 0
},
{
"plate": "S11HE",
"confidence": 73.550682,
"matches_template": 0
},
{
"plate": "S11CHE",
"confidence": 73.450493,
"matches_template": 0
},
{
"plate": "S11FBE",
"confidence": 71.782944,
"matches_template": 0
},
{
"plate": "S11FE",
"confidence": 71.762756,
"matches_template": 0
}
]
},
{
"plate": "EJLESSIE",
"epoch_time": 1402158050,
"confidence": 78.167984,
"matches_template": 0,
"region": "",
"region_confidence": 0,
"processing_time_ms": 51.650604,
"coordinates": [
{
"x": 226,
"y": 369
},
{
"x": 348,
"y": 348
},
{
"x": 355,
"y": 406
},
{
"x": 231,
"y": 429
}
],
"candidates": [
{
"plate": "EJLESSIE",
"confidence": 78.167984,
"matches_template": 0
},
{
"plate": "EDLESSIE",
"confidence": 77.61319,
"matches_template": 0
}
]
}
]
}
Commercial Agent
====================
`*` Requires Commercial License
The commercial OpenALPR Agent has a number of :ref:`enhancements `. With these enhancements, the commercial agent is significantly faster when analyzing video streams.
Installation
--------------
On an Ubuntu 14.04 64-bit server:
Add the OpenALPR GPG key and setup the OpenALPR deb repository
.. code-block:: bash
wget -O - http://deb.openalpr.com/openalpr.gpg.key | sudo apt-key add -
echo "deb http://deb.openalpr.com/commercial/ trusty main" | sudo tee /etc/apt/sources.list.d/openalpr.list
sudo apt-get update && sudo apt-get -y install openalpr openalpr-daemon
Edit the configuration file
.. code-block:: bash
sudo nano /etc/openalpr/alprd.conf
Configure the following properties:
- company_id (using the value found on the web server)
- site_id (a unique text value that identifies this agent)
- stream (The mjpeg URL for the camera stream. Multiple streams are added as additional stream entries)
- analysis_threads (number of CPU cores dedicated to OpenALPR processing)
- upload_address (set this to http://[*Web_server_IP*]/push/)
- store_plates_maxsize_mb (amount of space used for storing license plate images)
Test the daemon from the CLI to make sure your settings are correct. Press CTRL+C once you see that the video stream is connected.
alprd -f
If the MJPEG stream is configured correctly, the logs should show that the video is being retrieved
DEBUG - Video FPS: 10
Generate a license key for the agent:
.. code-block:: bash
cd ~
wget http://deb.openalpr.com/register.py
sudo openalpr-licenserequest --license_count 0 > /dev/null && sudo python register.py -u [Username] -p [Password] -c [Number of camera licenses]
The number of camera licenses corresponds to the maximum number of simultaneous video streams that this agent will support.
Each time you run this utility, it will transfer the requested number of licenses from our online registration server to your agent server.
Commercial Configuration Options
-----------------------------------
The /etc/openalpr/alprd.conf file has additional properties that control the commercial-only features:
The commercial software will group similar plate numbers together and send a JSON post that contains the UUIDs of all of the plate images in the group. These configuration files control the grouping sensitivity.
.. code-block:: ini
plate_groups_enabled = 1
plate_groups_time_delta_ms = 4500
plate_groups_min_plates_to_group = 3
The commercial daemon will maintain a disk quota and will automatically clean up after itself. Images stored to disk will be removed on a FIFO-basis. These parameters control the maximum size on disk and the frequency of clean-up.
.. code-block:: ini
store_plates_maxsize_mb = 8000
store_plates_cleanup_interval_seconds = 120
The upload threads control the number of simultaneous data uploads. Generally, the number of threads would only need to be increased if the web server is slow to respond.
.. code-block:: ini
upload_threads = 2
Motion detection is an effective way to improve efficiency and get more plate reads from the available processors. The ALPR processing will only analyze frames with movement, and will ignore areas of the image that have not changed. This parameter controls whether motion detection is enabled (1) or disabled (0).
.. code-block:: ini
motion_detection = 1
The ALPR processing occurs in parallel, each thread will consume an entire CPU core. Allocating more CPUs for ALPR processing will linearly increase the number of plate reads per second
.. code-block:: ini
analysis_threads = 2
With motion detection enabled, it's possible to buffer moving images and analyze them as CPU becomes available. For example, if a car moves past the camera over 10 frames, and the CPU can only analyze 3 of those frames during that period, the buffer will allow you to analyze all 10 frames. After the movement is complete and there is no other activity, the ALPR process will drain the buffer looking for license plates during the period of movement. Increasing the buffer_size will increase the duration of this period, but will also consume more memory. The camera_buffer_size unit is number of image frames.
.. code-block:: ini
camera_buffer_size = 60
Group Results
--------------
ALPR group results are sent in the following JSON format:
.. code-block:: json
{
"version": 1,
"data_type": "alpr_group",
"epoch_start": 1448326208789,
"epoch_end": 1448326210046,
"company_id": "44c9274f-8d57-432a-8cd7-8c991f22ead3",
"site_id": "dimitar-video",
"camera_id": 1414799424,
"uuids": [
"dimitar-video-cam1414799424-1448326208789",
"dimitar-video-cam1414799424-1448326209041",
"dimitar-video-cam1414799424-1448326209648",
"dimitar-video-cam1414799424-1448326209975",
"dimitar-video-cam1414799424-1448326210046"
],
"best_plate": {
"plate": "A13709",
"confidence": 92.075203,
"matches_template": 0,
"plate_index": 0,
"region": "mo",
"region_confidence": 0,
"processing_time_ms": 96.942459,
"requested_topn": 10,
"coordinates": [
{
"x": 204,
"y": 134
},
{
"x": 709,
"y": 222
},
{
"x": 658,
"y": 500
},
{
"x": 167,
"y": 383
}
],
"candidates": [
{
"plate": "A13709",
"confidence": 92.075203,
"matches_template": 0
},
{
"plate": "A137O9",
"confidence": 83.32373,
"matches_template": 0
},
{
"plate": "A137Q9",
"confidence": 83.001274,
"matches_template": 0
},
{
"plate": "A137D9",
"confidence": 82.240067,
"matches_template": 0
},
{
"plate": "AI3709",
"confidence": 80.574394,
"matches_template": 0
},
{
"plate": "A137U9",
"confidence": 80.238014,
"matches_template": 0
},
{
"plate": "A137G9",
"confidence": 78.271233,
"matches_template": 0
},
{
"plate": "A137B9",
"confidence": 78.039688,
"matches_template": 0
},
{
"plate": "A3709",
"confidence": 77.410858,
"matches_template": 0
},
{
"plate": "AI37O9",
"confidence": 71.822922,
"matches_template": 0
}
]
},
"best_confidence": 92.075203,
"best_uuid": "dimitar-video-cam1414799424-1448326208789",
"best_plate_number": "A13709"
}
Heartbeat
-------------
Every minute, the OpenALPR agent adds a heartbeat message to the queue. The heartbeat provides general health and status information. The format is as follows:
.. code-block:: json
{
"version": 1,
"data_type": "heartbeat",
"company_id": "xxxxxxxx-yyyy-yyyy-yyyy-zzzzzzzzzzzz",
"site_id": "your-unique-sitename",
"timestamp": 1453426302097,
"system_uptime_seconds": 2595123,
"daemon_uptime_seconds": 2594832,
"internal_ip_address": "192.168.0.54",
"cpu_cores": 2,
"cpu_last_update": 1453426297878,
"cpu_usage_percent": 18.579235,
"disk_quota_total_bytes": 8000000000,
"disk_quota_consumed_bytes": 0,
"disk_quota_last_update": 1453408254586,
"memory_consumed_bytes": 2083704832,
"memory_last_update": 1453426297878,
"memory_swapused_bytes": 0,
"memory_swaptotal_bytes": 1608511488,
"memory_total_bytes": 2099093504,
"processing_threads_active": 1,
"processing_threads_configured": 1,
"beanstalk_queue_size": 0,
"video_streams": [
{
"camera_id": 1630410444,
"fps": 12,
"is_streaming": true,
"url": "rtsp://192.168.0.5:554/axis-media/media.amp?videocodec=h264&resolution=1280x720&compression=30&mirror=0&rotation=0&textposition=top&text=1&clock=1&date=0&overlayimage=0&fps=11&keyframe_interval=32&videobitrate=0&maxframesize=0",
"last_update": 1453426302086
}
]
}
Web Services
-------------
The OpenALPR daemon exposes a simple web service for retrieving license plate images. Each image is referenced by a UUID that is sent along with the JSON metadata.
Assuming that the daemon port is set to the default (8355), the full image is referenced using the following URL:
- http://[*Agent_IP*]:8355/img/[*plate_event_uuid*].jpg
In some cases, you may prefer to just retrieve a cropped image around the license plate. This would require significantly less bandwidth than downloading the entire source image. The X and Y coordinates can be computed from the JSON metadata x/y coordinates of the license plate. The x1/y1 coordinates reference the top-left of the license plate crop region, and the x2/y2 coordinates reference the bottom right. For example, assuming the crop is located at (477,258), (632,297):
- http://[*Agent_IP*]:8355/crop/[*plate_event_uuid*]?x1=477&y1=258&x2=632&y2=297
Additionally, the web server exposes a `web service API `_ for searching license plates and groups. Detailed documentation is available in the :ref:`web server section `
OpenALPR Agent Docker Container
----------------------------------
The OpenALPR Agent Docker container runs the OpenALPR agent within Docker given a license.conf and alprd.conf file that you supply. The image is built on top of Ubuntu 14.04 64-bit. When the container is launched, it runs both Beanstalkd and the alprd daemon. The container exposes the following ports:
1. Port 11300 - Beanstalkd
2. Port 8355 - The OpenALPR daemon web service
The /var/lib/openalpr/plateimages/ folder is exposed as a volume that can be attached to the host file system. This location will contain license plate images in a rolling buffer with a maximum size specified in alprd.conf
openalpr_2.2.4.orig/doc/source/bindings.rst 0000775 0000000 0000000 00000024202 12664642524 0020772 0 ustar 00root root 0000000 0000000
.. _language_bindings:
********************
OpenALPR API
********************
OpenALPR is available as a C/C++ library and has bindings in C#, Java, and Python. Additionally, the software can be used as a "black box" that can process video streams and make the data available to another system (using any programming language).
C/C++
=================
First, download or compile the OpenALPR library onto your target platform. Make sure that the software runs by testing it using the alpr command-line executable. Pre-compiled binaries are available for 32/64-bit Windows and Ubuntu Linux.
1. Add "alpr.h" as an include file to your project.
2. Include the openalpr.dll (Windows) or libopenalpr.so (Unix) file with your binaries
3. Include all other required shared libraries
4. Put the openalpr.conf and runtime_data directory in the same location as the binaries. Alternatively, you can specify the location of the runtime_data in openalpr.conf or directly in the code.
Below is a simple usage example of using the OpenALPR library:
.. code-block:: c++
:linenos:
// Initialize the library using United States style license plates.
// You can use other countries/regions as well (for example: "eu", "au", or "kr")
alpr::Alpr openalpr("us", "/path/to/openalpr.conf");
// Optionally specify the top N possible plates to return (with confidences). Default is 10
openalpr.setTopN(20);
// Optionally, provide the library with a region for pattern matching. This improves accuracy by
// comparing the plate text with the regional pattern.
openalpr.setDefaultRegion("md");
// Make sure the library loaded before continuing.
// For example, it could fail if the config/runtime_data is not found
if (openalpr.isLoaded() == false)
{
std::cerr << "Error loading OpenALPR" << std::endl;
return 1;
}
// Recognize an image file. You could alternatively provide the image bytes in-memory.
alpr::AlprResults results = openalpr.recognize("/path/to/image.jpg");
// Iterate through the results. There may be multiple plates in an image,
// and each plate return sthe top N candidates.
for (int i = 0; i < results.plates.size(); i++)
{
alpr::AlprPlateResult plate = results.plates[i];
std::cout << "plate" << i << ": " << plate.topNPlates.size() << " results" << std::endl;
for (int k = 0; k < plate.topNPlates.size(); k++)
{
alpr::AlprPlate candidate = plate.topNPlates[k];
std::cout << " - " << candidate.characters << "\t confidence: " << candidate.overall_confidence;
std::cout << "\t pattern_match: " << candidate.matches_template << std::endl;
}
}
C# and VB.NET
====================
.. code-block:: c#
:linenos:
using openalprnet;
var alpr = new AlprNet("us", "/path/to/openalpr.conf", "/path/to/runtime_data");
if (!alpr.IsLoaded())
{
Console.WriteLine("OpenAlpr failed to load!");
return;
}
// Optionally apply pattern matching for a particular region
alpr.DefaultRegion = "md";
var results = alpr.Recognize("/path/to/image.jpg");
foreach (var result in results.Plates)
{
Console.WriteLine("Plate {0}: {1} result(s)", i++, result.TopNPlates.Count);
Console.WriteLine(" Processing Time: {0} msec(s)", result.ProcessingTimeMs);
foreach (var plate in result.TopNPlates)
{
Console.WriteLine(" - {0}\t Confidence: {1}\tMatches Template: {2}", plate.Characters,
plate.OverallConfidence, plate.MatchesTemplate);
}
}
Python
====================
.. code-block:: python
:linenos:
from openalpr import Alpr
alpr = Alpr("us", "/path/to/openalpr.conf", "/path/to/runtime_data")
if not alpr.is_loaded():
print("Error loading OpenALPR")
sys.exit(1)
alpr.set_top_n(20)
alpr.set_default_region("md")
results = alpr.recognize_file("/path/to/image.jpg")
i = 0
for plate in results['results']:
i += 1
print("Plate #%d" % i)
print(" %12s %12s" % ("Plate", "Confidence"))
for candidate in plate['candidates']:
prefix = "-"
if candidate['matches_template']:
prefix = "*"
print(" %s %12s%12f" % (prefix, candidate['plate'], candidate['confidence']))
# Call when completely done to release memory
alpr.unload()
Java
====================
.. code-block:: java
:linenos:
import com.openalpr.jni.Alpr;
import com.openalpr.jni.AlprPlate;
import com.openalpr.jni.AlprPlateResult;
import com.openalpr.jni.AlprResults;
Alpr alpr = new Alpr("us", "/path/to/openalpr.conf", "/path/to/runtime_data");
// Set top N candidates returned to 20
alpr.setTopN(20);
// Set pattern to Maryland
alpr.setDefaultRegion("md");
AlprResults results = alpr.recognize("/path/to/image.jpg");
System.out.format(" %-15s%-8s\n", "Plate Number", "Confidence");
for (AlprPlateResult result : results.getPlates())
{
for (AlprPlate plate : result.getTopNPlates()) {
if (plate.isMatchesTemplate())
System.out.print(" * ");
else
System.out.print(" - ");
System.out.format("%-15s%-8f\n", plate.getCharacters(), plate.getOverallConfidence());
}
}
// Make sure to call this to release memory
alpr.unload();
Node.js
====================
A Node.js binding to OpenALPR is available here:
https://www.npmjs.com/package/node-openalpr
The source code is available here:
https://github.com/netPark/node-openalpr
.. _cloud_api:
Cloud API (Commercial)
=======================
The OpenALPR Cloud API is a web-based service that analyzes images for license plates as well as vehicle information such as make, model, and color.
The Cloud API service is easy to integrate into your application via a web-based REST service. You send image data to the OpenALPR API, we process the data,
and return JSON data describing the license plate and vehicle.
Check out the online demo: http://www.openalpr.com/demo-image.html
Sign-Up
---------
When you're ready to get started, sign-up for an account at https://cloud.openalpr.com/
Once enrolled, you will automatically be assigned a free account that has a limited number of API credits per month. Each time you use the service, you use one or more
API credits. You may enter your credit card information and upgrade your plan to give you access to more credits per month.
Integrate
----------
Because the OpenALPR Cloud API is REST-based, it works with any programming language on any operating system. You can make API calls using whatever method
you prefer.
To make integration easier, the OpenALPR Cloud API also includes permissively licensed open source client libraries in a variety of languages.
The GitHub repo is available here: https://github.com/openalpr/cloudapi
Check out the `REST API documentation `_ for more detailed information about the REST service.
This is generated from the `OpenALPR Cloud API Swagger definition `_
.. _alpr_web_service:
Docker-Based Web Service (Commercial)
======================================
The OpenALPR Library Docker container provides the OpenALPR image processing as a web service. In this mode, images are sent to OpenALPR via HTTP POST, and OpenALPR responds with the metadata describing all license plates in the image. This docker image exposes port 8080.
Requests into this service are sent as HTTP POST requests to:
http://[*ip_address*]:8080/v1/identify/plate
The post should contain this parameter:
image - A file containing a JPEG image
Results will be sent back in the following JSON format:
.. code-block:: json
{
"data_type": "alpr_results",
"epoch_time": 1448299357883,
"img_height": 480,
"img_width": 640,
"results": [
{
"plate": "AKS4329",
"confidence": 86.457352,
"region_confidence": 95,
"region": "ga",
"plate_index": 0,
"processing_time_ms": 84.982811,
"candidates": [
{
"matches_template": 0,
"plate": "AKS43Z9",
"confidence": 88.429092
},
{
"matches_template": 1,
"plate": "AKS4329",
"confidence": 86.457352
},
{
"matches_template": 0,
"plate": "AKS3Z9",
"confidence": 79.028625
},
{
"matches_template": 0,
"plate": "AKS329",
"confidence": 77.056877
}
],
"coordinates": [
{
"y": 128,
"x": 286
},
{
"y": 129,
"x": 360
},
{
"y": 159,
"x": 360
},
{
"y": 157,
"x": 286
}
],
"matches_template": 1,
"requested_topn": 20
}
],
"version": 2,
"processing_time_ms": 172.226624,
"regions_of_interest": []
}
OpenALPR Agent
====================
OpenALPR can also be configured as a "black box" that makes data available to other systems. When configured in this mode, OpenALPR is installed as a Linux daemon, and is configured to monitor one or more MJPEG video streams. It automatically processes the images and produces JSON data describing the license plates found int he images. This data can either be pushed to another server (as an HTTP POST) or pulled from another server (via beanstalkd queue).
More information about the OpenALPR agent is available here: :ref:`alprd` openalpr_2.2.4.orig/doc/source/cloudapi.yaml 0000664 0000000 0000000 00000024364 12664642524 0021135 0 ustar 00root root 0000000 0000000 swagger: '2.0'
info:
version: "1.0.1"
title: OpenALPR Cloud API
host: api.openalpr.com
basePath: /v1
schemes:
- https
produces:
- application/json
paths:
# Send an image to OpenALPR and get the analyzed results
/recognize:
post:
description: |
Send an image for OpenALPR to analyze and provide metadata back
consumes:
- "multipart/form-data"
produces:
- application/json
parameters:
-
name: secret_key
in: query
description: |
The secret key used to authenticate your account. You can view your
secret key by visiting
https://cloud.openalpr.com/
required: true
type: string
-
name: tasks
in: query
description: |
Tasks to execute. You can choose to detect the license plate,
as well as additional metadata about the vehicle. Each additional
option costs an API credit.
required: true
type: array
items:
type: string
enum: [ "plate", "color", "make", "makemodel"]
-
name: image
in: formData
description: |
The image file that you wish to analyze
At least one value for image, image_bytes, or image_url must be provided
required: true
type: file
-
name: image_bytes
in: query
description: |
The image file that you wish to analyze encoded in base64
At least one value for image, image_bytes, or image_url must be provided
required: false
type: string
-
name: image_url
in: query
description: |
A URL to an image that you wish to analyze
At least one value for image, image_bytes, or image_url must be provided
required: false
type: string
-
name: country
in: query
description: |
Defines the training data used by OpenALPR. "us" analyzes
North-American style plates. "eu" analyzes European-style plates.
This field is required if using the "plate" task
You may use multiple datasets by using commas between the country
codes. For example, 'au,auwide' would analyze using both the
Australian plate styles. A full list of supported country codes
can be found here
https://github.com/openalpr/openalpr/tree/master/runtime_data/config
required: false
type: string
-
name: state
in: query
description: |
Corresponds to a US state or EU country code used by OpenALPR pattern
recognition. For example, using "md" matches US plates against the
Maryland plate patterns. Using "fr" matches European plates against
the French plate patterns.
required: false
type: string
-
name: return_image
in: query
description: |
If set to 1, the image you uploaded will be encoded in base64 and
sent back along with the response
required: false
type: integer
enum: [0, 1]
-
name: topn
in: query
description: |
The number of results you would like to be returned for plate
candidates and vehicle classifications
required: false
type: integer
minimum: 1
maximum: 1000
-
name: prewarp
in: query
description: |
Prewarp configuration is used to calibrate the analyses for the
angle of a particular camera. More information is available here
http://doc.openalpr.com/accuracy_improvements.html#calibration
required: false
type: string
# Expected responses for this operation:
responses:
# Response code
200:
description: OK
headers:
X-RateLimit-Limit:
description: Maximum number of requests allowed from your IP in a period
type: integer
X-Ratelimit-Remaining:
description: Number of remaining requests allowed during this period
type: integer
X-Ratelimit-Reset:
description: Epoch time when the next period begins
type: integer
schema:
properties:
total_processing_time:
type: number
description: Time spent processing all tasks (in milliseconds)
img_width:
type: integer
description: Width of the uploaded image in pixels
img_height:
type: integer
description: Height of the input image in pixels
credit_cost:
type: integer
description: The number of API credits that were used to process this image
credits_monthly_used:
type: integer
description: The number of API credits used this month
credits_monthly_total:
type: integer
description: The maximum number of API credits available this month according to your plan
makemodel:
type: array
description: Results from makemodel vehicle analysis task
items:
$ref: '#/definitions/classification'
make:
type: array
description: Results from make vehicle analysis task
items:
$ref: '#/definitions/classification'
color:
type: array
description: Results from color vehicle analysis task
items:
$ref: '#/definitions/classification'
plate:
$ref: '#/definitions/alpr_plate'
400:
description: Parameter is invalid
schema:
properties:
error:
type: string
description: Text error message describing the invalid input
401:
description: User not authorized or invalid secret_key
schema:
properties:
error:
type: string
description: Text error message describing the invalid input
402:
description: Monthly usage limit exceeded
schema:
properties:
error:
type: string
description: Text error message describing the invalid input
403:
description: Temporary rate-limit exceeded
schema:
properties:
error:
type: string
description: Text error message describing the invalid input
definitions:
classification:
type: object
properties:
confidence:
type: number
value:
type: string
coordinate:
type: object
properties:
x:
type: integer
y:
type: integer
region_of_interest:
type: object
properties:
x:
type: integer
y:
type: integer
width:
type: integer
height:
type: integer
plate_candidate:
type: object
properties:
plate:
type: string
description: Plate number
confidence:
type: number
description: Confidence percentage that the plate number is correct
matches_template:
type: integer
description: Indicates whether the plate matched a regional text pattern
plate_details:
type: object
properties:
plate:
type: string
description: Best plate number for this plate
matches_template:
type: integer
description: Indicates whether the plate matched a regional text pattern
requested_topn:
type: integer
description: The max number of results requested
processing_time_ms:
type: number
description: Number of milliseconds to process the license plate
confidence:
type: number
description: Confidence percentage that the plate number is correct
region:
type: string
description: Specified or detected region (e.g., tx for Texas)
region_confidence:
type: number
description: Confidence percentage that the plate region is correct
coordinates:
type: array
description: |
The X/Y coordinates of the license plate in the image
Four coordinates are provided that form a polygon starting
from the top-left and moving clockwise ending in the bottom left
items:
$ref: '#/definitions/coordinate'
candidates:
type: array
description: All the top N candidates that could be the correct plate number
items:
$ref: '#/definitions/plate_candidate'
alpr_plate:
description: Results from plate analysis task
type: object
properties:
results:
type: array
items:
$ref: '#/definitions/plate_details'
img_width:
type: integer
description: Width of the uploaded image in pixels
img_height:
type: integer
description: Height of the input image in pixels
regions_of_interest:
type: array
description: Describes the areas analyzed in the input image
items:
$ref: '#/definitions/region_of_interest'
epoch_time:
# This is actually an integer, but setting to number to avoid issues with overflow
type: number
description: Epoch time that the image was processed in milliseconds
version:
type: integer
description: API format version
data_type:
type: string
enum: ["alpr_results", "alpr_group", "heartbeat"]
description: Specifies the type of data in this response
processing_time_ms:
type: number
description: Number of milliseconds to process all license plates
openalpr_2.2.4.orig/doc/source/commandline.rst 0000775 0000000 0000000 00000006326 12664642524 0021472 0 ustar 00root root 0000000 0000000 .. _alpr_command_line:
************************
Command Line Utility
************************
The OpenALPR Command Line Interface (CLI) utility is a great way to quickly test ALPR against images, videos, or webcams. It is not recommended for sophisticated integration, since each time the CLI utility loads, it takes a number of seconds to initialize all of the OpenALPR recognition data.
Usage
------
::
alpr [-c ] [--config ] [-n ] [--seek
] [-p ] [--motion] [--clock] [-d] [-j]
[--] [--version] [-h] <> ...
Where:
-c , --country
Country code to identify (either us for USA or eu for Europe).
Default=us
--config
Path to the openalpr.conf file
-n , --topn
Max number of possible plate numbers to return. Default=10
--seek
Seek to the specied millisecond in a video file. Default=0
-p , --pattern
Attempt to match the plate number against a plate pattern (e.g., md
for Maryland, ca for California)
--motion
Use motion detection on video file or stream. Default=off
--clock
Measure/print the total time to process image and all plates.
Default=off
-d, --detect_region
Attempt to detect the region of the plate image. [Experimental]
Default=off
-j, --json
Output recognition results in JSON format. Default=off
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--version
Displays version information and exits.
-h, --help
Displays usage information and exits.
<> (accepted multiple times)
(required) Image containing license plates
Examples
-----------
This command will attempt to recognize number plates in the /source/image.jpg image using the European-style recognition data. The config
file is not provided on the CLI, so it will use the value in the environment variable 'OPENALPR_CONFIG_FILE' if provided, or the default
location.
::
$ alpr -c eu /source/image.jpg
This command will attempt to recognize number plates in the /source/image.png image using the default USA-style recognition data. The config
file is not provided on the CLI, so it will read the configuration data from /tmp/openalpr.conf
::
$ alpr --config /tmp/openalpr.conf /source/image.png
This command will attempt to recognize number plates in all jpeg images in the current directory image using the USA-style recognition data.
::
$ alpr -c us *.jpg
This command reads data from an input video (/source/video.mp4) and outputs recognition data as JSON.
::
$ alpr -j /source/video.mp4
This command processes a list of image files provided in /source/imagefilelist.txt and writes JSON results to /out/recognitionresults.txt.
::
$ alpr -j stdin < /source/imagefilelist.txt > /out/recognitionresults.txt
This command processes video from your webcam. You can also use /dev/video0, /dev/video1, etc. if you have multiple webcams.
::
$ alpr webcam
openalpr_2.2.4.orig/doc/source/commercial.rst 0000775 0000000 0000000 00000010335 12664642524 0021312 0 ustar 00root root 0000000 0000000 .. _commercial:
*************************
Commercial Enhancements
*************************
OpenALPR is commercially supported open source software. OpenALPR is licensed under dual licenses to meet the needs of open source users as well as for-profit commercial entities. The software may be used under the terms of the Affero `GNU Public License v3 (AGPL) `_. However, this license has strong copyleft requirements that most for-profit companies cannot use. For this reason, we also offer the software under a commercial license. Please contact info@openalpr.com for license pricing and terms.
The OpenALPR commercial license overrides the AGPL terms and allows OpenALPR to be used without copyleft requirements. The software may then be used, integrated, and distributed in closed-source proprietary applications.
Additionally, there are a number of features and enhancements that are available exclusively to commercial customers.
.. _commercial_enhancements:
- Multi-core processing
- Efficient processing via motion detection
- License plate grouping
- High-accuracy US state recognition
- Support for H264 video streams
- On-Premises web server
- Video file processing
Multi-Core Processing
-----------------------
The OpenALPR agent utilizes multiple CPU cores in parallel to improve the analysis frame rate. Faster processing allows OpenALPR to record number plates for vehicles at higher speeds and will also contribute to higher accuracy at lower speeds due to plate grouping. The "analysis_threads" configuration property in alprd.conf controls the number of simmultaneous CPU cores used to process license plates. Additionally, if a GPU is available (either via OpenCL or Nvidia CUDA) the agent can make use of this to accelerate license plate processing.
Efficient Processing via Motion Detection
-------------------------------------------
Utilizing motion detection greatly increases the efficiency of the OpenALPR agent. Rather than monitoring all pixels of every frame in a video, the software ignores areas in the video that have not changed (and therefore could not contain a license plate). When motion is detected, only the portion where the vehicle is located will be analyzed.
To provide the most possible reads, OpenALPR also utilizes a configurable image buffer. When there is lots of motion detected, the video frames are placed into this buffer and processed. Therefore, if the video has moments of inactivity, the CPU resources will remain utilized processing older video data in order to provide the most possible license plate reads.
License Plate Grouping
-----------------------
In a video stream, a single license plate is often seen many times as it travels past the camera. For example, if the vehicle passes the camera over the course of 2 seconds at 30 frames per second, OpenALPR may recognize that same license plate 60 times. The plate grouping feature tracks the license plate as it moves, and delivers a single result for the license plate number that is scored based on the number of recognitions. Therefore, high-speed processing produces a highly accurate license plate number.
High-Accuracy US State Recognition
------------------------------------
This feature determines the US state for a given license plate. For example, OpenALPR will differentiate a Maryland license plate versus one from California. This also increases accuracy, since each state has a unique text pattern. Knowing the originating state for the license plate allows OpenALPR to match the text results against the unique state pattern.
Support for H264 Video Streams
--------------------------------
The OpenALPR Commercial agent has more ubiquitous support for connecting to IP camera video streams. In addition to MJPEG, OpenALPR also supports H264 over both RTSP and HTTP.
On-Premises Web Server
-------------------------
The commercial web server is a data repository for license plate information. License plates is browsable, searchable, and triggers e-mail alerts for matching plate numbers.
Video File Processing
----------------------
OpenALPR has a utility that efficiently processes video files to produce a CSV output containing all the license plates found in the video stream.
openalpr_2.2.4.orig/doc/source/compiling.rst 0000775 0000000 0000000 00000020046 12664642524 0021160 0 ustar 00root root 0000000 0000000 ************************
Compiling
************************
Windows
=============
Using Precompiled Binaries
---------------------------
Precompiled binaries are available for Windows in both 32 and 64-bit format. You can find the latest binaries on the `GitHub releases page `_. This is the simplest option for installing OpenALPR onto a Windows machine. Included in the package are the Visual Studio 2015 runtime drivers. You must install this first in order to use the OpenALPR software.
Compiling OpenALPR via Build Script
------------------------------------
`OpenALPR Windows Build Scripts `_
Compile OpenALPR and Dependencies Manually
--------------------------------------------
`Video Tutorial `_
* Ensure you have a version of Visual Studio that is at least 2008 or above
* Download and install `cmake for windows `_
* Download `OpenCV for Windows `_ (3.0.0 at this time)
* Download `Tesseract OCR source code and VS2008 project files `_ (3.04 at this time)
* Download `Leptonica vs2008 development package `_ (Tesseract requirement)
* Download `OpenALPR source code `_ from GitHub
* Create a libraries directory and put opencv and Tesseract into them
* Compile OpenCV. `cd` into the opencv directory and type cmake . to create the VisualStudio project.
* Compile Tesseract. Tesseract requires that you point it to the leptonica headers and the library binaries before it will compile. Note that tesseract needs to be compiled as a LIBRARY. Make sure also that your compile mode matches for each of the projects (e.g., Release vs Debug).
* Update the CMakeLists.txt file in the OpenALPR src directory to point to the folders for your Tesseract and OpenCV libraries
* Depending on the versions of the libraries, you may need to tweak the linked libraries in here as well (e.g., liblept168 may be liblept173 at some point in the future). These correspond to the library files for Leptonica and Tesseract.
* CD into the openalpr src directory and type "cmake ."
* Open the Visual Studio solution and compile.
* If all goes well, there should be an "alpr" executable. In order to execute it, you will need a number of DLLs from OpenCV. simply finding them in the OpenCV directories and copying them over to your executable should do the trick.
Linux
=============
OpenALPR compiles on many flavors of Linux. However, the software is officially supported on Ubuntu 14.04 64-bit.
Using Precompiled Binaries
---------------------------
Precompiled binaries are available for Ubuntu 14.04 64-bit OS. This is the simplest option for installing OpenALPR onto a Linux machine. The precompiled binaries are managed via APT, so upgrades will automatically be installed when you use the *apt-get update && apt-get upgrade* command. To install the precompiled binaries, run the following commands on your Ubuntu machine.
.. code-block:: bash
wget -O - http://deb.openalpr.com/openalpr.gpg.key | sudo apt-key add -
echo "deb http://deb.openalpr.com/master/ trusty main" | sudo tee /etc/apt/sources.list.d/openalpr.list
sudo apt-get update
sudo apt-get install openalpr openalpr-daemon openalpr-utils libopenalpr-dev
Test the library
.. code-block:: bash
# Test US plates
wget http://plates.openalpr.com/ea7the.jpg
alpr -c us ea7the.jpg
# Test European plates
wget http://plates.openalpr.com/h786poj.jpg
alpr -c eu h786poj.jpg
Compiling OpenALPR
-------------------
.. code-block:: bash
# Install prerequisites
sudo apt-get install libopencv-dev libtesseract-dev git cmake build-essential libleptonica-dev
sudo apt-get install liblog4cplus-dev libcurl3-dev
# If using the daemon, install beanstalkd
sudo apt-get install beanstalkd
# Clone the latest code from GitHub
git clone https://github.com/openalpr/openalpr.git
# Setup the build directory
cd openalpr/src
mkdir build
cd build
# setup the compile environment
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc ..
# compile the library
make
# Install the binaries/libraries to your local system (prefix is /usr)
sudo make install
# Test the library
wget http://plates.openalpr.com/h786poj.jpg -O lp.jpg
alpr lp.jpg
Compile OpenALPR and all Dependencies
--------------------------------------
1. Make sure that dependencies and required tools are installed
* sudo apt-get install libpng12-dev libjpeg62-dev libtiff4-dev zlib1g-dev
* sudo apt-get install build-essential
* sudo apt-get install autoconf automake libtool
* sudo apt-get install git-core
* sudo apt-get install cmake
2. install opencv (tutorial)
* http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html
3. download and install leptonica and tesseract-ocr
* tesseract-ocr requires leptonica and at least one language package.
* http://www.leptonica.org/source/leptonica-1.70.tar.gz
* https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz
* https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz
* move the downloaded tarballs to some directory. I will assume that they are located at /usr/local/src/openalpr/.
4. unpack the tarballs:
* tar xf /usr/local/src/openalpr/tesseract-ocr-3.02.02.tar.gz
* tar xf /usr/local/src/openalpr/tesseract-ocr-3.02.02.eng.tar.gz
* tar xf /usr/local/src/openalpr/leptonica-1.70.tar.gz
5. compile leptonica:
* cd /usr/local/src/openalpr/leptonica-1.70/
* ./configure --prefix=/usr/local
* make
* make install
6. compile tesseract:
* cd /usr/local/src/openalpr/tesseract-ocr/
* ./autogen.sh
* ./configure
* make
* sudo make install
* sudo ldconfig
7. clone the openalpr repo to /usr/local/src/openalpr/ directory
* cd /usr/local/src/openalpr/
* git clone https://github.com/openalpr/openalpr.git
8. update CMakeLists.txt compile openalpr
* cd /usr/local/src/openalpr/openalpr/
* gedit CMakeLists.txt &
* SET(OpenCV_DIR "/usr/local/lib")
* SET(Tesseract_DIR "/usr/local/src/openalpr/tesseract-ocr")
* cmake ./
* make
Note: For Tesseract 3.04 the source files can be downloaded from the main svn branch or https://drive.google.com/folderview?id=0B7l10Bj_LprhQnpSRkpGMGV2eE0&usp=sharing#list.
Mac OS X
=========
Instructions for compiling on OS X, tested on OS X 10.9.5 (Mavericks).
Using Homebrew
---------------
* brew tap homebrew/science
* brew install openalpr
Compiling OpenALPR Manually
----------------------------
.. code-block:: bash
# Clone the latest code from GitHub
git clone https://github.com/openalpr/openalpr.git
# Setup the build directory
cd openalpr/src
mkdir build
cd build
# setup the compile environment
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc ..
# compile the library
make
# Install the binaries/libraries to your local system (prefix is /usr)
sudo make install
# Test the library
wget http://easy-clan.com/ski/pics/license_plate.JPG -O lp.jpg
alpr lp.jpg
Mobile (iOS and Android)
==============================
The OpenALPR library compiles on Android and iOS. Example reference apps are available:
- `Android `_
- `iOS `_
Docker
=============
OpenALPR supports containerization inside Docker. It uses Ubuntu 14.04 as a base image, and installs all the software using pre-compiled binaries. Download the OpenALPR DockerFile and run the following commands to build it:
.. code-block:: bash
# Build docker image
docker build -t openalpr https://github.com/openalpr/openalpr.git
# Download test image
wget http://plates.openalpr.com/h786poj.jpg
# Run alpr on image
docker run -it --rm -v $(pwd):/data:ro openalpr -c eu h786poj.jpg openalpr_2.2.4.orig/doc/source/conf.py 0000775 0000000 0000000 00000021752 12664642524 0017751 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
#
# openalpr documentation build configuration file, created by
# sphinx-quickstart on Sun Nov 15 23:25:01 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
import shlex
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = []
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'openalpr'
copyright = u'2015, OpenALPR Technology, Inc.'
author = u'Matthew Hill'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '2.2.0'
# The full version, including alpha/beta/rc tags.
release = '2.2.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# " v documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
#html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'openalprdoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Latex figure (float) alignment
#'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'openalpr.tex', u'openalpr Documentation',
u'Matthew Hill', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'openalpr', u'openalpr Documentation',
[author], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'openalpr', u'openalpr Documentation',
author, 'openalpr', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
openalpr_2.2.4.orig/doc/source/index.rst 0000775 0000000 0000000 00000003527 12664642524 0020313 0 ustar 00root root 0000000 0000000 .. openalpr documentation master file, created by
sphinx-quickstart on Sun Nov 15 23:25:01 2015.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
OpenALPR Documentation
====================================
Getting Started
------------------
OpenALPR is an open source Automatic License Plate Recognition library written in C++ with bindings in C#, Java, Node.js, and Python. The library analyzes images and video streams to identify license plates. The output is the text representation of any license plate characters.
The software can be used in many different ways. For example, with OpenALPR you can:
#. Recognize license plates from camera streams. The results are :ref:`browsable, searchable and can trigger alerts `. The data repository can be in the cloud or stored entirely within your network on-premises. `*`
#. Recognize license plates from camera streams and :ref:`send the results to your own application `.
#. :ref:`Process a video file ` and store the license plate results in a CSV and SQLite database. `*`
#. Analyze still images from the :ref:`command-line `
#. Integrate license plate recognition into your application :ref:`directly in-code (C/C++, C#, VB.NET, Java, Python, Node.js) `
#. Run OpenALPR as a :ref:`web service `. A JPG image is sent over HTTP POST, the OpenALPR web service responds with the license plate information in the image. `*`
`*` Requires :ref:`OpenALPR Commercial License `
Contents:
.. toctree::
:maxdepth: 2
compiling
commandline
bindings
alprd
web_server
video_processing
accuracy_improvements
commercial
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
openalpr_2.2.4.orig/doc/source/video_processing.rst 0000664 0000000 0000000 00000010642 12664642524 0022537 0 ustar 00root root 0000000 0000000
.. _video_processing:
******************
Video Processing
******************
`*` Requires Commercial License
The video processing is available as both a C/C++ embeddable library as well as a command-line utility. The utility is given a video file (e.g., MPG, AVI, MP4, etc.) and processes it to find all of the license plates in the video. The output is a CSV file that lists the license plate information
Command-Line Usage
---------------------
The alpr_video command line utility can be executed to analyze video. You will launch the program with a path to a video file. Also include an output directory, this is where the csv and SQLite files are saved. The threads option provides more threads to process the video simmultaneously (this should not exceed the number of CPU cores on the machine).
.. code-block:: bash
USAGE:
./alpr_video --output_dir [-c ] [--config
] [-n ] [--threads ] [-p
] [--save_frames] [--debug] [--motion] [--]
[--version] [-h]
Where:
--output_dir
(required) Path to the output directory
-c , --country
Country code to identify (either us for USA or eu for Europe).
Default=us
--config
Path to the openalpr.conf file
-n , --topn
Max number of possible plate numbers to return. Default=10
--threads
Number of simmultaneous processing threads. Default=1
-p , --pattern
Attempt to match the plate number against a plate pattern (e.g., md
for Maryland, ca for California)
--save_frames
Save the image frames for recognized license plates. Default=off
--debug
Print diagnostic information to the console. Default=off
--motion
Use motion detection on video file or stream. Default=on
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--version
Displays version information and exits.
-h, --help
Displays usage information and exits.
(required) Video file containing license plates
OpenAlpr Video Processing Utility
Library Usage
--------------------
The library can be executed directly in C/C++. Include the alprvideo.h file, and link the openalprvideo.dll (or libopenalprvideo.so in Unix). The following example will analyze the "license_plate_video.mp4" file.
.. code-block:: c++
#include "alprvideo.h"
using namespace alpr;
int main(int argc, char** argv) {
AlprVideo alpr_video("c:\\temp\\license_plate_video.mp4", "us", "c:\\temp\\openalpr.conf");
alpr_video.setOutputDir("C:\\temp\\lpdata\\");
alpr_video.setNumThreads(2);
alpr_video.setPatternMatch("md");
alpr_video.setSaveFrames(false);
// Video processing can either run in the foreground or background. For background, use start_async()
alpr_video.start();
std::cout << "Video processing complete" << std::endl;
}
Results
---------
The results are made available in CSV files as well as a SQLite database for querying. The image frames where license plates were found are also optionally saved to a folder on the disk.
The CSV data is exported in two files. One file shows the individual plate reads, and the other shows the plate groups. For example:
Plate Results:
.. csv-table:: Plate Results
id,group_id,country,plate_number,confidence,frame_num,video_time_s,matches_pattern,tracking_hash,x1,y1,x2,y2,x3,y3,x4,y4,img_name,region,region_confidence
1,2,gb,CV60UWK,78.4882,70,2.84,1,,36,235,176,280,169,314,29,267,,gb,0
2,2,gb,CV60UWK,75.4025,73,2.96,1,,134,180,269,220,260,251,127,209,,gb,0
3,2,gb,CV60UWK,83.4606,74,3,1,,167,159,310,199,300,238,159,196,,gb,0
4,2,gb,CV60UWK,82.3763,75,3.04,1,,198,141,332,180,322,215,189,177,,gb,0
Plate Groups:
.. csv-table:: Plate Groups
id,country,plate_number,matches_pattern,plate_count,frame_start,frame_end,video_time_start_s,video_time_end_s,best_plate_id,confidence,region,region_confidence
2,gb,CV60UK,0,6,70,77,2.84,3.12,6,82.6058,gb,0
1,gb,GP0VZC,0,9,199,211,8,8.48,18,84.4312,gb,0
4,gb,GR15RYT,1,2,981,994,39.28,39.8,39,82.4912,gb,0 openalpr_2.2.4.orig/doc/source/web_server.rst 0000664 0000000 0000000 00000027653 12664642524 0021352 0 ustar 00root root 0000000 0000000 .. _web_server:
***********************
OpenALPR Web Server
***********************
`*` Requires Commercial License
Requirements
================
OpenALPR Cloud collects metadata about license plates seen by your cameras. This data is browsable, searchable, and can trigger alerts. The Web server can be available either:
#. In the cloud
#. Installed On-Premises within your network
If you haven't seen the `live demo `_, check it out! It shows a realistic example of the type of information you will soon be collecting from your cameras.
In order to get started, you will need:
1. An IP camera capable of serving MJPEG or H264 video
2. An OpenALPR agent installed on your network
First, configure your IP camera to capture the area that you wish to monitor. Generally, you'll want the video to be able to capture a clear image of the license plate in order for OpenALPR to properly identify the numbers. You may want to experiment with different optical zoom levels and resolutions to get the best image quality. A straight-on shot of the license plate is best, but OpenALPR can work with shots at an angle.
Once your camera is setup, make sure that it has an IP address and that you can connect to the MJPEG or H264 stream. Some cameras support arguments in the URL to control resolution, frame-rate, etc. The Firefox web browser has the best MJPEG support among major browsers. Type in the MJPEG or H264 stream URL to Firefox and you should be able to clearly see your video. Some users reduce the frames per second (fps) of their video feed in order to reduce the stream bandwidth.
Architecture
=============
.. image:: images/webserver_architecture.png
:scale: 100%
:alt: OpenALPR Web Server Architecture
As depicted in the diagram above, the OpenALPR agent reads a video stream from your IP camera, processes it, and uploads plate metadata to the OpenALPR cloud. The agent also stores all of the plate images on a rolling buffer in its hard drive.
There is a constant stream of data flowing between the camera and the agent as well as between the agent and the cloud. The data sent to the cloud is relatively low-bandwidth because it contains text metadata describing the license plates, and not the images. When you log into the OpenALPR Cloud web portal to view your data, that information is retrieved on-demand. OpenALPR Cloud does not store your plate images, these are downloaded directly from the agent when you select a plate to view.
Web Server Installation
===============================
On an Ubuntu 14.04 64-bit server:
Add the OpenALPR GPG key and setup the OpenALPR deb repository
.. code-block:: bash
wget -O - http://deb.openalpr.com/openalpr.gpg.key | sudo apt-key add -
echo "deb http://deb.openalpr.com/commercial/ trusty main" | sudo tee /etc/apt/sources.list.d/openalpr.list
sudo apt-get update && sudo apt-get -y install openalpr-web
You will be prompted to create a MySQL database password. Type in a value that is secure and that you will remember.
Configure OpenALPR by typing:
.. code-block:: bash
openalpr-web-createdb
You will be prompted for the MySQL database password. Type in the same value entered above.
Next, you will need to create an administrative user account. Type in an e-mail address and a password for this new user. You will use this to login to the web interface once it's started
Connect to the web interface by opening a browser and going to: *http://[System_IP_address]*
If you don't already know the system IP address, it can be found by typing ifconfig.
Login with the user e-mail and password that you just created.
Click on the "Getting Started" link and make note of your "Company ID." You will need this to configure the agents and to setup API integrations. This value should be kept secure and should be treated like a password.
Agent Installation
===================
The :ref:`OpenALPR agent ` is installed as either a Virtual Machine (VM) or a Debian install for 64-bit Ubuntu Linux. The VM installs in a few minutes and can run on any operating system (e.g., Windows, Linux, Mac OS X). The Debian installer for 64-bit Ubuntu Linux is a more advanced install option.
Virtual Machine Install
-------------------------
- Start downloading the `latest OpenALPR Virtual Machine `_.
- Download and install the `VirtualBox installer `_ for your operating system. The OpenALPR VM will also work with other hypervisors such as VMware, Xen, or HyperV if you prefer to use one of those.
- Open VirtualBox and choose File → Import Appliance
- Choose the openalpr.ova file downloaded in step #1
- Accept the default memory and CPU settings and click "Import"
.. image:: images/webserver_vminstall1.png
:scale: 100%
:alt: OpenALPR VM installation step 1
- Select the openalpr-agent-vm and click "Start"
- The VM should boot up quickly and provide you with a login prompt. Login with the default credentials: admin/admin
- You should see a menu like the one below. Use the up/down, tab, and enter keys to navigate the menu.
.. image:: images/webserver_vminstall2.png
:scale: 100%
:alt: OpenALPR VM installation step 2
- First setup the network by choosing **Network** → **eth0**.
- Select either DHCP or static depending on your LAN configuration
- Select Network → Test and make sure that you can successfully ping www.google.com
.. image:: images/webserver_vminstall3.png
:scale: 100%
:alt: OpenALPR VM installation step 3
- Select **Upgrade** from the main menu. The OpenALPR software is updated more frequently than the VM, there may be updates available.
- Optional Steps:
- Optionally, select **Password** from the main menu to change your password to something more secure.
- You may optionally install the OpenALPR web server onto this VM. Select **Install Web** to start the install process. Doing this will allow you to search, browse, and alert on license plates from your local VM rather than from the cloud. This requires an on-premises license, please contact info@openalpr.com for an evaluation license.
- Select **Configure** from the main menu. This will provide you with a URL to connect to in a browser to complete the process.
- You will be directed to: http://[Agent-IP-Address]/agentconfig
.. image:: images/webserver_vminstall4.png
:scale: 100%
:alt: OpenALPR VM installation step 4
- In the agentconfig web interface, select **Remote Connection**. This connects your local agent with your web server. If using the cloud service, the web server is located at cloud.openalpr.com. Otherwise it is the IP/hostname of the server where you installed the OpenALPR web software. If you installed OpenALPR on the same system, use **localhost**.
- Type in your username (e-mail address) and password, and click **Connect**. You should see a message indicating that the connection was successful.
- Click **Agent Config**
- You may be prompted to login. Use the e-mail address and password that you just used to authenticate with the web server.
.. image:: images/webserver_vminstall5.png
:scale: 100%
:alt: OpenALPR VM installation step 4
- Scroll to the bottom and add a video stream.
- Select the model of IP camera you wish to connect to. Fill in the IP address. If the camera requires credentials, check the box and enter your camera's username and password.
- Click **Test**. After a few seconds, you will see a window indicating whether the connection was successful or not. If it was successful, click **Save Camera**. Otherwise, try another option (such as H264 Alt1 or MJPEG) and click **Test** again until you succeed.
.. image:: images/webserver_vminstall-testsuccess.png
:scale: 100%
:alt: OpenALPR VM installation step 4
- Next, configure the **Agent Parameters**.
- Choose a sensible name for your **Site ID**. This is usually the location of the agent system (e.g., headquarters, dallas-branch, warehouse3, etc.). Each agent should be given a unique Site ID.
- Choose the **country** where the camera is located. US will recognize North American-style plates (12 inches x 6 inches). EU will recognize European-style plates. There is also support for other countries that have plates with different dimensions.
- The number of **Processing Cores** controls how much CPU is allocated to the LPR process. The more processing cores you provide (up to the number of CPU cores on the system) the more frames per second (fps) you can process. Higher fps generally contributes to better accuracy and capability to detect plates on faster moving vehicles.
- **Disk Quota** controls how much space is reserved for storing vehicle and license plate images. It operates as a rolling buffer, so once it runs out of space, the oldest images are removed.
- **Pattern** should be set to the State (in the USA) or country (in Europe) that the camera is located in. This gives OpenALPR additional information about the patterns on the plates. It won't disqualify values from other states/countries, but it will help weigh results to give higher confidence to plates that do match the pattern.
- Click **Update**.
.. image:: images/webserver_vminstall6.png
:scale: 100%
:alt: OpenALPR VM installation step 4
- Lastly, if you scroll to the top of the page you can watch the agent status. At this point you should see **Video FPS** and other information indicating that video is being pulled from the camera and license plates are being recognized. Now that the agent is configured, it will continue collecting data from the configured video streams. If the agent is rebooted, it will pick back up on restart. If the camera goes down and comes back, or the network is down temporarily, the agent will retry until connectivity is restored. All results are queued, so no data is lost in the event of an outage.
.. image:: images/webserver_vminstall7.png
:scale: 100%
:alt: OpenALPR VM installation step 4
- Click on the **Web Server** link at the top of the page to start browsing license plate results.
On an Ubuntu 14.04 64-bit Linux Install
---------------------------------------
Alternatively, you may prefer to install the OpenALPR agent directly onto the server. These steps are not required if you installed the Virtual Machine referenced above.
First install a copy of `Ubuntu 14.04 64-bit Linux server `_ and gain console access.
From the terminal:
.. code-block:: bash
# Install the OpenALPR repository GPG key
wget -O - http://deb.openalpr.com/openalpr.gpg.key | sudo apt-key add -
# Add the OpenALPR repository to your server
echo "deb http://deb.openalpr.com/commercial/ trusty main" | sudo tee /etc/apt/sources.list.d/openalpr.list
# Install the OpenALPR software
sudo apt-get update
sudo apt-get install openalpr openalpr-daemon openalpr-utils libopenalpr-dev openalpr-daemonconfig
You may use the web interface to configure the agent (http://[agent-ip-address]/agentconfig or you may edit the configuration file /etc/openalpr/alprd.conf
Configure the company_id, site_id, country, and stream values as described in the Virtual Machine section. Make sure that the value for upload_data is set to 1 and that the upload_address setting is configured to http://[on_premises_webserver]/push
.. code-block:: bash
# Restart the alprd process
sudo service openalprd-daemon start
# Tail the logs to see if the daemon is running successfully
tail -f /var/log/alpr.log
If all goes well, the log should show that the video stream is being processed and plates are being identified and uploaded. Once a plate is uploaded it should show up on the OpenALPR Cloud dashboard after a few seconds.
.. _web_services_api:
Web Services API
------------------
The `Web Services API `_ can be used to query your On-Premises server for data. The API is documented `here `_ openalpr_2.2.4.orig/doc/source/web_server_api.yaml 0000664 0000000 0000000 00000031770 12664642524 0022330 0 ustar 00root root 0000000 0000000 ---
swagger: '2.0'
info:
title: OpenALPR REST API
version: v1.0
description: |
The OpenALPR REST API allows you to search license plate data programmatically from the
OpenALPR Web server. Using this API you can search for license plate groups, individual
reads, and alerts. You can also retrieve the plate images from the agent.
tags:
-
name: webserver
description: REST API for the Web Server and plate metadata
-
name: agent
description: REST API for the agent and image data
paths:
/api/search/group:
get:
tags:
- webserver
description: Search for ALPR group results
parameters:
- description: Company UUID used for authentication
in: query
name: company_id
required: true
type: string
- description: unique ID for the site
in: query
name: site
required: false
type: string
- description: unique camera number
in: query
name: camera
required: false
type: number
- description: Start time in ISO 8601 format. At least start or end must be defined.
in: query
name: start
required: false
type: string
- description: End time in ISO 8601 format. At least start or end must be defined.
in: query
name: end
required: false
type: string
- description: Plate Number to search for
in: query
name: plate
required: false
type: string
- description: Search plate using regular expression. Disabled (0) or Enabled (1)
in: query
name: wildcard
required: false
type: number
- description: Maximum number of results to return
in: query
name: topn
required: false
type: number
- description: Order can be either desc or asc
in: query
name: order
required: false
type: string
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/group'
'400':
description: "Bad input provided. Adjust the query parameters and try again.\nThe text accompanying the error will provide more detail about which query \nparameters are incorrect.\n"
'401':
description: "Unauthorized. You must either provide a valid company_id or \nhave a logged in session\n"
/api/search/plate:
get:
tags:
- webserver
description: Search for individual plate results
parameters:
- description: Company UUID used for authentication
in: query
name: company_id
required: true
type: string
- description: unique ID for the site
in: query
name: site
required: false
type: string
- description: unique camera number
in: query
name: camera
required: false
type: number
- description: Start time in ISO 8601 format. At least start or end must be defined.
in: query
name: start
required: false
type: string
- description: End time in ISO 8601 format. At least start or end must be defined.
in: query
name: end
required: false
type: string
- description: Plate Number to search for
in: query
name: plate
required: false
type: string
- description: Search plate using regular expression. Disabled (0) or Enabled (1)
in: query
name: wildcard
required: false
type: number
- description: Maximum number of results to return
in: query
name: topn
required: false
type: number
- description: Order can be either desc or asc
in: query
name: order
required: false
type: string
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/plate'
'400':
description: "Bad input provided. Adjust the query parameters and try again.\nThe text accompanying the error will provide more detail about which query \nparameters are incorrect.\n"
'401':
description: "Unauthorized. You must either provide a valid company_id or \nhave a logged in session\n"
'/api/detail/group/{group_id}':
get:
tags:
- webserver
description: Get detailed results for a group record
parameters:
- in: path
name: group_id
required: true
type: string
- description: Company UUID used for authentication
in: query
name: company_id
required: true
type: string
responses:
'200':
description: OK
schema:
$ref: '#/definitions/group_detail'
'401':
description: "Unauthorized. You must either provide a valid company_id or \nhave a logged in session\n"
'404':
description: |
The requested ID was not found
'/api/detail/plate/{plate_id}':
get:
tags:
- webserver
description: Get detailed results for a plate record
parameters:
- in: path
name: plate_id
required: true
type: string
- description: Company UUID used for authentication
in: query
name: company_id
required: true
type: string
responses:
'200':
description: OK
schema:
$ref: '#/definitions/plate_detail'
'401':
description: "Unauthorized. You must either provide a valid company_id or \nhave a logged in session\n"
'404':
description: |
The requested ID was not found
'/img/{uuid}.jpg':
get:
tags:
- agent
description: Get an image for the requested plate. This web service is served on port 8355.
parameters:
- in: path
name: uuid
required: true
type: string
produces:
- image/jpeg
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/plate'
'404':
description: not found
securityDefinitions: {}
swagger: '2.0'
definitions:
plate:
type: object
properties:
pk:
type: integer
description: "Unique integer ID for this plate"
model:
type: string
description: "Name of the data type"
fields:
type: object
properties:
best_confidence:
type: number
description: "Percent confidence of the license plate result"
best_plate:
type: string
description: "The plate number with the highest confidence"
uuid:
type: string
description: "Unique identifier for the image where the license plate was found"
epoch_time:
type: string
description: "Time that the plate was seen in ISO-8601 format"
camera:
type: integer
description: "Unique ID of the camera"
company:
type: integer
description: "Company ID"
site:
type: string
description: "Site ID where the plate was captured"
plate_index:
type: integer
description: "Within a single image (UUID) there may be multiple plates. This is the unique ID of the single plate within an image"
img_width:
type: integer
description: "Image width in pixels"
img_height:
type: integer
description: "Image height in pixels"
processing_time_ms:
type: number
description: "Time in milliseconds taken to identify the license plate from an image"
x1:
type: integer
description: "Pixel coordinates for the license plate. x1,y1 -> x4,y4 forms a polygon starting from the top-left and working clockwise to the bottom-left corners."
y1:
type: integer
x2:
type: integer
y2:
type: integer
x3:
type: integer
y3:
type: integer
x4:
type: integer
y4:
type: integer
group:
type: object
properties:
pk:
type: integer
description: "Unique integer ID for this plate"
model:
type: string
description: "Name of the data type"
fields:
type: object
properties:
best_confidence:
type: number
description: "Percent confidence of the license plate result"
best_plate:
type: string
description: "The plate number with the highest confidence"
best_index:
type: integer
description: "Within a single image (UUID) there may be multiple plates. This is the unique ID of the single plate within an image"
best_uuid:
type: string
description: "Unique identifier for the image where the highest confidence license plate was found"
epoch_time_start:
type: string
description: "Time that the plate was initially seen in ISO-8601 format"
epoch_time_end:
type: string
description: "Time that the plate was last seen in ISO-8601 format"
camera:
type: integer
description: "Unique ID of the camera"
company:
type: integer
description: "Company ID"
site:
type: string
description: "Site ID where the plate was captured"
plate_detail:
type: object
properties:
best_confidence:
type: number
description: "Percent confidence of the license plate result"
best_plate:
type: string
description: "The plate number with the highest confidence"
uuid:
type: string
description: "Unique identifier for the image where the license plate was found"
epoch_time:
type: string
description: "Time that the plate was seen in ISO-8601 format"
camera:
$ref: '#/definitions/camera_info'
regions_of_interest:
type: object
description: "Areas that were analyzed. Typically wherever motion is found"
properties:
x: { type: integer }
y: { type: integer }
width: { type: integer }
height: { type: integer }
candidates:
type: array
items:
type: object
properties:
plate_number: { type: string }
confidence: { type: number }
coordinates:
type: array
items:
type: object
properties:
x: { type: integer }
y: { type: integer }
site:
type: string
description: "Site ID where the plate was captured"
plate_index:
type: integer
description: "Within a single image (UUID) there may be multiple plates. This is the unique ID of the single plate within an image"
img_width:
type: integer
description: "Image width in pixels"
img_height:
type: integer
description: "Image height in pixels"
processing_time_ms:
type: number
description: "Time in milliseconds taken to identify the license plate from an image"
group_detail:
type: object
properties:
id:
type: integer
description: "Unique ID for the group"
camera:
$ref: '#/definitions/camera_info'
site:
type: string
description: "Site ID where the plate was captured"
epoch_time_start:
type: string
description: "Time that the plate was initially seen in ISO-8601 format"
epoch_time_end:
type: string
description: "Time that the plate was last seen in ISO-8601 format"
best_confidence:
type: number
description: "Percent confidence of the license plate result"
best_plate:
type: string
description: "The plate number with the highest confidence"
best_index:
type: integer
description: "Within a single image (UUID) there may be multiple plates. This is the unique ID of the single plate within an image"
best_uuid:
type: string
description: "Unique identifier for the image where the highest confidence license plate was found"
uuids:
type: array
items:
type: string
camera_info:
type: object
properties:
camera_number:
type: integer
description: "Unique ID of the camera"
camera_name:
type: string
description: "Friendly name of the camera" openalpr_2.2.4.orig/doc/watch_for_changes.sh 0000775 0000000 0000000 00000000056 12664642524 0021144 0 ustar 00root root 0000000 0000000 #!/bin/bash
find source/ | entr ./generate
openalpr_2.2.4.orig/runtime_data/ 0000775 0000000 0000000 00000000000 12664642524 0017047 5 ustar 00root root 0000000 0000000 openalpr_2.2.4.orig/runtime_data/cameras.yaml 0000664 0000000 0000000 00000021456 12664642524 0021356 0 ustar 00root root 0000000 0000000 ---
version: 1
manufacturers:
A-Linking:
mjpeg:
- "http://[username]:[password]@[ip_address]/GetData.cgi"
Airlink:
mjpeg:
- "http://[username]:[password]@[ip_address]/mjpeg.cgi"
- "http://[username]:[password]@[ip_address]/cgi/mjpg/mjpeg.cgi"
- "http://[username]:[password]@[ip_address]/cgi/jpg/image.cgi"
Airlive:
mjpeg:
- "http://[username]:[password]@[ip_address]/video.mjpg"
- "http://[username]:[password]@[ip_address]/mjpg/video.mjpg"
Airwave:
mjpeg:
- "http://[username]:[password]@[ip_address]/cgi-bin/pusher.cgi"
Arecont:
mjpeg:
- "http://[username]:[password]@[ip_address]/mjpeg?res=full&x0=0&y0=0&x1=100%&y1=100%&quality=12&doublescan=0&fps=15&ver=HTTP/1.1"
- "http://[username]:[password]@[ip_address]/image?res=half&x0=0&y0=0&x1=1600&y1=1200&quality=15&doublescan=0"
Aviosys:
mjpeg:
- "http://[username]:[password]@[ip_address]/GetData.cgi"
- "http://[username]:[password]@[ip_address]/cgi-bin/Stream?Video?Authorization="
Axis:
mjpeg:
- "http://[username]:[password]@[ip_address]/axis-cgi/mjpg/video.cgi?fps=15"
h264:
- "rtsp://[username]:[password]@[ip_address]/axis-media/media.amp"
- "rtsp://[username]:[password]@[ip_address]/mpeg4/media.amp"
Bosch:
mjpeg:
- "http://[username]:[password]@[ip_address]/rtsp_tunnel?h26x=4&line=1&inst=2"
h264:
- "rtsp://[username]:[password]@[ip_address]/rtsp_tunnel"
Bowya:
mjpeg:
- "http://[username]:[password]@[ip_address]/video.cgi"
Canon:
mjpeg:
- "http://[username]:[password]@[ip_address]/-wvhttp-01-/"
- "http://[username]:[password]@[ip_address]/-wvhttp-01-/GetOneShot"
- "http://[username]:[password]@[ip_address]/-wvhttp-01-/GetOneShot?frame_count=no_limit"
- "http://[username]:[password]@[ip_address]/-wvhttp-01-/GetStillImage"
Cisco:
h264:
- "rtsp://[username]:[password]@[ip_address]/"
Convision:
mjpeg:
- "http://[username]:[password]@[ip_address]/fullsize.push?camera=1&sleep=15"
CNB:
h264:
- "rtsp://[username]:[password]@[ip_address]/"
D-Link:
mjpeg:
- "http://[username]:[password]@[ip_address]/video/mjpg.cgi"
- "http://[username]:[password]@[ip_address]/video.cgi"
- "http://[username]:[password]@[ip_address]/mjpeg.cgi"
- "http://[username]:[password]@[ip_address]/cgi-bin/video.jpg"
- "http://[username]:[password]@[ip_address]/IMAGE.jpg"
- "http://[username]:[password]@[ip_address]/cgi-bin/video.vam"
- "http://[username]:[password]@[ip_address]/_gCVimage.jpg"
Digicom:
mjpeg:
- "http://[username]:[password]@[ip_address]/mjpeg.cgi"
Easyn:
mjpeg:
- "http://[username]:[password]@[ip_address]/videostream.cgi?user=username&pwd=password"
Edimax:
mjpeg:
- "http://[username]:[password]@[ip_address]/jpg/image.jpg"
- "http://[username]:[password]@[ip_address]/mjpg/video.mjpg"
- "http://[username]:[password]@[ip_address]/snapshot.cgi"
Ego:
mjpeg:
- "http://[username]:[password]@[ip_address]/cgi-bin/sf.cgi"
Foscam:
mjpeg:
- "http://[username]:[password]@[ip_address]/videostream.cgi"
- "http://[username]:[password]@[ip_address]/snapshot.cgi"
Fulicom:
mjpeg:
- "http://[username]:[password]@[ip_address]/cgi-bin/sf.cgi"
Gadspot:
mjpeg:
- "http://[username]:[password]@[ip_address]/Jpeg/CamImg.jpg"
- "http://[username]:[password]@[ip_address]/GetData.cgi?Status=0"
Goscam:
mjpeg:
- "http://[ip_address]/cgi-bin/Stream?Video?Acc=[username]?Pwd=[password]?webcamPWD=RootCookies00000"
Hamlet:
mjpeg:
- "http://[username]:[password]@[ip_address]/mjpeg.cgi"
Hikvision:
mjpeg:
- "http://[username]:[password]@[ip_address]/cgi-bin/video.jpg?cam=1&quality=3&size=2"
h264:
- "rtsp://[username]:[password]@[ip_address]/h264/ch1/sub/"
- "rtsp://[username]:[password]@[ip_address]:554/Streaming/Channels/1"
- "rtsp://[username]:[password]@[ip_address]:554/ch0_0.h264"
IQeye:
mjpeg:
- "http://[username]:[password]@[ip_address]/now.jpg?snap=spush"
Intellinet:
mjpeg:
- "http://[username]:[password]@[ip_address]/jpg/image.jpg"
JVC:
mjpeg:
- "http://[username]:[password]@[ip_address]/api/video?encode=jpeg&framerate=15&boundary=on"
Kingnow:
mjpeg:
- "http://[username]:[password]@[ip_address]/cgi-bin/sf.cgi"
Linksys:
mjpeg:
- "http://[username]:[password]@[ip_address]/img/video.mjpeg"
- "http://[username]:[password]@[ip_address]/img/mjpeg.cgi"
- "http://[username]:[password]@[ip_address]/img/snapshot.cgi?size=2"
- "http://[username]:[password]@[ip_address]/adm/file.cgi?h_videotype=mjpeg&todo=save"
Linudix:
mjpeg:
- "http://[username]:[password]@[ip_address]/cgi-bin/nph-update_4ch.cgi?ch=1"
Lumenera:
mjpeg:
- "http://[username]:[password]@[ip_address]/cgi-bin/nph-video"
Lumens:
h264:
- "rtsp://[username]:[password]@[ip_address]:8557/h264"
Marmitek:
mjpeg:
- "http://[username]:[password]@[ip_address]/cgi/mjpg/mjpeg.cgi"
Mobotix:
mjpeg:
- "http://[username]:[password]@[ip_address]/record/current.jpg"
- "http://[username]:[password]@[ip_address]/control/faststream.jpg?stream=full"
- "http://[username]:[password]@[ip_address]/faststream.jpg?stream=full&fps=1.0 (1 fps)"
- "http://[username]:[password]@[ip_address]/faststream.jpg?stream=full&fps=3.0 (1 fps)"
- "http://[username]:[password]@[ip_address]/faststream.jpg?stream=full&fps=0 (max frame rate)"
Moxa:
mjpeg:
- "http://[username]:[password]@[ip_address]/cgi-bin/video.jpg"
PLANET:
mjpeg:
- "http://[username]:[password]@[ip_address]/jpg/image.jpg"
Panasonic:
mjpeg:
- "http://[username]:[password]@[ip_address]/nphMotionJpeg?Resolution=640x480&Quality=Clarity"
- "http://[username]:[password]@[ip_address]/cgi-bin/nphContinuousServerPush"
- "http://[username]:[password]@[ip_address]/SnapshotJPEG?mode=Refresh"
- "http://[username]:[password]@[ip_address]/cgi-bin/camera"
h264:
- "rtsp://[username]:[password]@[ip_address]/MediaInput/h264/stream_1"
Pixord:
mjpeg:
- "http://[username]:[password]@[ip_address]/Getimage.cgi"
- "http://[username]:[password]@[ip_address]/Getimage?camera=1&fmt=full"
- "http://[username]:[password]@[ip_address]/Getimage?camera=1&fmt=qsif"
Qnap:
mjpeg:
- "http://[username]:[password]@[ip_address]/cgi/mjpg/mjpeg.cgi"
Samsung_SNB:
mjpeg:
- "http://[username]:[password]@[ip_address]/video?submenu=mjpg"
- "http://[username]:[password]@[ip_address]/video?submenu=jpg"
Sanyo:
mjpeg:
- "http://[username]:[password]@[ip_address]/liveimg.cgi?serverpush=1"
Sharkx:
mjpeg:
- "http://[username]:[password]@[ip_address]/stream.jpg"
Shenzen_Sunsky:
mjpeg:
- "http://[username]:[password]@[ip_address]/cgi-bin/sf.cgi"
Skyway_Security:
mjpeg:
- "http://[username]:[password]@[ip_address]/GetData.cgi?Status=0"
- "http://[username]:[password]@[ip_address]/Jpeg/CamImg.jpg"
Sony:
mjpeg:
- "http://[username]:[password]@[ip_address]/image"
- "http://[username]:[password]@[ip_address]/image?speed=0"
- "http://[username]:[password]@[ip_address]/oneshotimage.jpg"
Surecom:
mjpeg:
- "http://[username]:[password]@[ip_address]/mjpeg.cgi"
Swann:
mjpeg:
- "http://[username]:[password]@[ip_address]/cgi/jpg/image.cgi"
TP-Link:
mjpeg:
- "http://[username]:[password]@[ip_address]/jpg/image.jpg"
- "http://[username]:[password]@[ip_address]/video.mjpg"
Topcom:
mjpeg:
- "http://[username]:[password]@[ip_address]/mjpeg.cgi"
Toshiba:
mjpeg:
- "http://[username]:[password]@[ip_address]/__live.jpg?&&&"
- "http://[username]:[password]@[ip_address]getstream.cgi?10&10&&&10&0&0&0&0"
Trendnet:
mjpeg:
- "http://[username]:[password]@[ip_address]/goform/video"
- "http://[username]:[password]@[ip_address]/goform/video2"
- "http://[username]:[password]@[ip_address]/cgi/mjpg/mjpg.cgi"
- "http://[username]:[password]@[ip_address]/GetData.cgi"
- "http://[username]:[password]@[ip_address]/image.jpg"
Vilar:
mjpeg:
- "http://[username]:[password]@[ip_address]/cgi-bin/sf.cgi"
Vivotek:
mjpeg:
- "http://[username]:[password]@[ip_address]/video.mjpg"
- "http://[username]:[password]@[ip_address]/cgi-bin/video.jpg"
- "http://[username]:[password]@[ip_address]/cgi-bin/viewer/video.jpg"
h264:
- "rtsp://[username]:[password]@[ip_address]/live.sdp"
Y-Cam:
mjpeg:
- "http://[username]:[password]@[ip_address]/stream.jpg"
Zavio:
mjpeg:
- "http://[username]:[password]@[ip_address]/jpg/image.jpg"
openalpr_2.2.4.orig/runtime_data/config/ 0000775 0000000 0000000 00000000000 12664642524 0020314 5 ustar 00root root 0000000 0000000 openalpr_2.2.4.orig/runtime_data/config/au.conf 0000664 0000000 0000000 00000002276 12664642524 0021577 0 ustar 00root root 0000000 0000000 ; 35-50; 45-60, 55-70, 65-80, 75-90
char_analysis_min_pct = 0.35
char_analysis_height_range = 0.15
char_analysis_height_step_size = 0.10
char_analysis_height_num_steps = 5
segmentation_min_speckle_height_percent = 0.3
segmentation_min_box_width_px = 4
segmentation_min_charheight_percent = 0.4;
segmentation_max_segment_width_percent_vs_average = 1.6;
plate_width_mm = 372
plate_height_mm = 135
multiline = 0
char_height_mm = 82
char_width_mm = 45
char_whitespace_top_mm = 18
char_whitespace_bot_mm = 30
template_max_width_px = 165
template_max_height_px = 60
; Higher sensitivity means less lines
plateline_sensitivity_vertical = 22
plateline_sensitivity_horizontal = 50
; Regions smaller than this will be disqualified
min_plate_size_width_px = 85
min_plate_size_height_px = 28
; Results with fewer or more characters will be discarded
postprocess_min_characters = 4
postprocess_max_characters = 8
ocr_language = lau
; Override for postprocess letters/numbers regex.
postprocess_regex_letters = [A-Z]
postprocess_regex_numbers = [0-9]
; Whether the plate is always dark letters on light background, light letters on dark background, or both
; value can be either always, never, or auto
invert = auto openalpr_2.2.4.orig/runtime_data/config/auwide.conf 0000664 0000000 0000000 00000002252 12664642524 0022442 0 ustar 00root root 0000000 0000000
; 35-50; 45-60, 55-70, 65-80, 75-90
char_analysis_min_pct = 0.35
char_analysis_height_range = 0.15
char_analysis_height_step_size = 0.10
char_analysis_height_num_steps = 5
segmentation_min_box_width_px = 5
segmentation_min_charheight_percent = 0.4;
segmentation_max_segment_width_percent_vs_average = 2.0;
plate_width_mm = 520
plate_height_mm = 110
multiline = 0
char_height_mm = 80
char_width_mm = 53
char_whitespace_top_mm = 10
char_whitespace_bot_mm = 10
template_max_width_px = 184
template_max_height_px = 46
; Higher sensitivity means less lines
plateline_sensitivity_vertical = 18
plateline_sensitivity_horizontal = 55
; Regions smaller than this will be disqualified
min_plate_size_width_px = 100
min_plate_size_height_px = 20
; Results with fewer or more characters will be discarded
postprocess_min_characters = 4
postprocess_max_characters = 8
detector_file = eu.xml
ocr_language = lau
; Override for postprocess letters/numbers regex.
postprocess_regex_letters = [A-Z]
postprocess_regex_numbers = [0-9]
; Whether the plate is always dark letters on light background, light letters on dark background, or both
; value can be either always, never, or auto
invert = auto openalpr_2.2.4.orig/runtime_data/config/eu.conf 0000664 0000000 0000000 00000002340 12664642524 0021573 0 ustar 00root root 0000000 0000000 ; One-line European style plates
; 35-50; 45-60, 55-70, 65-80, 75-90
char_analysis_min_pct = 0.35
char_analysis_height_range = 0.15
char_analysis_height_step_size = 0.10
char_analysis_height_num_steps = 5
segmentation_min_speckle_height_percent = 0.2
segmentation_min_box_width_px = 5
segmentation_min_charheight_percent = 0.4;
segmentation_max_segment_width_percent_vs_average = 2.0;
plate_width_mm = 520
plate_height_mm = 110
multiline = 0
char_height_mm = 80
char_width_mm = 53
char_whitespace_top_mm = 10
char_whitespace_bot_mm = 10
template_max_width_px = 184
template_max_height_px = 46
; Higher sensitivity means less lines
plateline_sensitivity_vertical = 18
plateline_sensitivity_horizontal = 55
; Regions smaller than this will be disqualified
min_plate_size_width_px = 65
min_plate_size_height_px = 18
; Results with fewer or more characters will be discarded
postprocess_min_characters = 5
postprocess_max_characters = 8
ocr_language = leu
; Override for postprocess letters/numbers regex.
postprocess_regex_letters = [A-Z]
postprocess_regex_numbers = [0-9]
; Whether the plate is always dark letters on light background, light letters on dark background, or both
; value can be either always, never, or auto
invert = auto openalpr_2.2.4.orig/runtime_data/config/gb.conf 0000664 0000000 0000000 00000002371 12664642524 0021556 0 ustar 00root root 0000000 0000000 ; One-line European style plates
; 35-50; 45-60, 55-70, 65-80, 75-90
char_analysis_min_pct = 0.35
char_analysis_height_range = 0.15
char_analysis_height_step_size = 0.10
char_analysis_height_num_steps = 5
segmentation_min_speckle_height_percent = 0.2
segmentation_min_box_width_px = 5
segmentation_min_charheight_percent = 0.4;
segmentation_max_segment_width_percent_vs_average = 2.0;
plate_width_mm = 520
plate_height_mm = 110
multiline = 0
char_height_mm = 80
char_width_mm = 53
char_whitespace_top_mm = 10
char_whitespace_bot_mm = 10
template_max_width_px = 184
template_max_height_px = 46
; Higher sensitivity means less lines
plateline_sensitivity_vertical = 18
plateline_sensitivity_horizontal = 55
; Regions smaller than this will be disqualified
min_plate_size_width_px = 65
min_plate_size_height_px = 18
; Results with fewer or more characters will be discarded
postprocess_min_characters = 5
postprocess_max_characters = 8
detector_file = eu.xml
ocr_language = lgb
; Override for postprocess letters/numbers regex.
postprocess_regex_letters = [A-Z]
postprocess_regex_numbers = [0-9]
; Whether the plate is always dark letters on light background, light letters on dark background, or both
; value can be either always, never, or auto
invert = auto
openalpr_2.2.4.orig/runtime_data/config/kr.conf 0000664 0000000 0000000 00000002324 12664642524 0021600 0 ustar 00root root 0000000 0000000
; 35-50; 45-60, 55-70, 65-80, 75-90
char_analysis_min_pct = 0.35
char_analysis_height_range = 0.15
char_analysis_height_step_size = 0.10
char_analysis_height_num_steps = 5
segmentation_min_speckle_height_percent = 0.15
segmentation_min_box_width_px = 4
segmentation_min_charheight_percent = 0.2
segmentation_max_segment_width_percent_vs_average = 2.0
plate_width_mm = 520
plate_height_mm = 110
multiline = 0
char_height_mm = 80
char_width_mm = 43
char_whitespace_top_mm = 10
char_whitespace_bot_mm = 10
template_max_width_px = 184
template_max_height_px = 46
; Higher sensitivity means less lines
plateline_sensitivity_vertical = 18
plateline_sensitivity_horizontal = 55
; Regions smaller than this will be disqualified
min_plate_size_width_px = 100
min_plate_size_height_px = 20
; Results with fewer or more characters will be discarded
postprocess_min_characters = 7
postprocess_max_characters = 7
detector_file = eu.xml
ocr_language = lkr
; Override for postprocess letters/numbers regex.
postprocess_regex_letters = \pL
postprocess_regex_numbers = [0-9]
; Whether the plate is always dark letters on light background, light letters on dark background, or both
; value can be either always, never, or auto
invert = auto openalpr_2.2.4.orig/runtime_data/config/mx.conf 0000664 0000000 0000000 00000002324 12664642524 0021610 0 ustar 00root root 0000000 0000000 ; 30-50, 40-60, 50-70, 60-80
char_analysis_min_pct = 0.30
char_analysis_height_range = 0.20
char_analysis_height_step_size = 0.10
char_analysis_height_num_steps = 4
segmentation_min_speckle_height_percent = 0.3
segmentation_min_box_width_px = 4
segmentation_min_charheight_percent = 0.5;
segmentation_max_segment_width_percent_vs_average = 1.35;
plate_width_mm = 304.8
plate_height_mm = 152.4
multiline = 0
char_height_mm = 70
char_width_mm = 35
char_whitespace_top_mm = 38
char_whitespace_bot_mm = 38
template_max_width_px = 120
template_max_height_px = 60
; Higher sensitivity means less lines
plateline_sensitivity_vertical = 25
plateline_sensitivity_horizontal = 45
; Regions smaller than this will be disqualified
min_plate_size_width_px = 70
min_plate_size_height_px = 35
; Results with fewer or more characters will be discarded
postprocess_min_characters = 5
postprocess_max_characters = 7
detector_file = us.xml
ocr_language = lus
; Override for postprocess letters/numbers regex.
postprocess_regex_letters = [A-Z]
postprocess_regex_numbers = [0-9]
; Whether the plate is always dark letters on light background, light letters on dark background, or both
; value can be either always, never, or auto
invert = auto
openalpr_2.2.4.orig/runtime_data/config/sg.conf 0000664 0000000 0000000 00000002130 12664642524 0021570 0 ustar 00root root 0000000 0000000 ; One-line European style plates
; 35-50; 45-60, 55-70, 65-80, 75-90
char_analysis_min_pct = 0.35
char_analysis_height_range = 0.15
char_analysis_height_step_size = 0.10
char_analysis_height_num_steps = 5
segmentation_min_box_width_px = 5
segmentation_min_charheight_percent = 0.4;
segmentation_max_segment_width_percent_vs_average = 2.0;
plate_width_mm = 520
plate_height_mm = 110
multiline = 0
char_height_mm = 70
char_width_mm = 52
char_whitespace_top_mm = 10
char_whitespace_bot_mm = 10
template_max_width_px = 226
template_max_height_px = 48
; Higher sensitivity means less lines
plateline_sensitivity_vertical = 25
plateline_sensitivity_horizontal = 70
; Regions smaller than this will be disqualified
min_plate_size_width_px = 65
min_plate_size_height_px = 18
detector_file = eu.xml
ocr_language = lsg
; Override for postprocess letters/numbers regex.
postprocess_regex_letters = [A-HJ-NP-Z]
postprocess_regex_numbers = [0-9]
; Whether the plate is always dark letters on light background, light letters on dark background, or both
; value can be either always, never, or auto
invert = auto
openalpr_2.2.4.orig/runtime_data/config/us.conf 0000664 0000000 0000000 00000002273 12664642524 0021616 0 ustar 00root root 0000000 0000000 ; 30-50, 40-60, 50-70, 60-80
char_analysis_min_pct = 0.30
char_analysis_height_range = 0.20
char_analysis_height_step_size = 0.10
char_analysis_height_num_steps = 4
segmentation_min_speckle_height_percent = 0.3
segmentation_min_box_width_px = 4
segmentation_min_charheight_percent = 0.5;
segmentation_max_segment_width_percent_vs_average = 1.35;
plate_width_mm = 304.8
plate_height_mm = 152.4
multiline = 0
char_height_mm = 70
char_width_mm = 35
char_whitespace_top_mm = 38
char_whitespace_bot_mm = 38
template_max_width_px = 120
template_max_height_px = 60
; Higher sensitivity means less lines
plateline_sensitivity_vertical = 25
plateline_sensitivity_horizontal = 45
; Regions smaller than this will be disqualified
min_plate_size_width_px = 70
min_plate_size_height_px = 35
; Results with fewer or more characters will be discarded
postprocess_min_characters = 4
postprocess_max_characters = 8
ocr_language = lus
; Override for postprocess letters/numbers regex.
postprocess_regex_letters = [A-Z]
postprocess_regex_numbers = [0-9]
; Whether the plate is always dark letters on light background, light letters on dark background, or both
; value can be either always, never, or auto
invert = auto openalpr_2.2.4.orig/runtime_data/keypoints/ 0000775 0000000 0000000 00000000000 12664642524 0021074 5 ustar 00root root 0000000 0000000 openalpr_2.2.4.orig/runtime_data/keypoints/us/ 0000775 0000000 0000000 00000000000 12664642524 0021523 5 ustar 00root root 0000000 0000000 openalpr_2.2.4.orig/runtime_data/keypoints/us/ak2008.jpg 0000664 0000000 0000000 00000024666 12664642524 0023150 0 ustar 00root root 0000000 0000000 JFIF C !"$"$ C "
} !1AQa"q2#BR$3br
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz
w !1AQaq"2B #3Rbr
$4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ? fg*u5w<16?[?fm>|iׯ1Zޘ/o'yc=~
>Ѽ4.1 @ns-ԧHy$zt]
Vrm$v}ML՟,L/^?
p ~ N=L8x\K _`? //_8C w?n^?
q wzʚq?*f