├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── Sample
└── OpenALPRSample
│ ├── .gitignore
│ ├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── assets
│ │ └── runtime_data
│ │ │ └── openalpr.conf
│ │ ├── ic_launcher-web.png
│ │ ├── java
│ │ └── com
│ │ │ └── sandro
│ │ │ └── openalprsample
│ │ │ └── MainActivity.java
│ │ └── res
│ │ ├── layout
│ │ └── activity_main.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── app
├── .gitignore
├── .idea
│ ├── .name
│ ├── compiler.xml
│ ├── copyright
│ │ └── profiles_settings.xml
│ ├── gradle.xml
│ ├── misc.xml
│ ├── modules.xml
│ ├── vcs.xml
│ └── workspace.xml
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ └── runtime_data
│ │ ├── keypoints
│ │ ├── eu
│ │ │ ├── au.jpg
│ │ │ ├── be.jpg
│ │ │ ├── bg.jpg
│ │ │ ├── cy.jpg
│ │ │ ├── de.jpg
│ │ │ ├── dk.jpg
│ │ │ ├── eng.jpg
│ │ │ ├── es2000.jpg
│ │ │ ├── es2006.jpg
│ │ │ ├── est.jpg
│ │ │ ├── fr.jpg
│ │ │ ├── gb2000.jpg
│ │ │ ├── gb2006.jpg
│ │ │ ├── it.jpg
│ │ │ ├── nl.jpg
│ │ │ ├── pl2000.jpg
│ │ │ ├── pl2006.jpg
│ │ │ ├── pt1992.jpg
│ │ │ └── pt1998.jpg
│ │ └── us
│ │ │ ├── ak2008.jpg
│ │ │ ├── al2002.jpg
│ │ │ ├── ar2006.jpg
│ │ │ ├── az1996.jpg
│ │ │ ├── ca1993.jpg
│ │ │ ├── co2000.jpg
│ │ │ ├── ct2000.jpg
│ │ │ ├── dc2003.jpg
│ │ │ ├── de1970.jpg
│ │ │ ├── fl2004.jpg
│ │ │ ├── ga2007.jpg
│ │ │ ├── hi1991.jpg
│ │ │ ├── ia1997.jpg
│ │ │ ├── id2006.jpg
│ │ │ ├── il2002.jpg
│ │ │ ├── in2009.jpg
│ │ │ ├── ks2007b.jpg
│ │ │ ├── ky2005.jpg
│ │ │ ├── la2006.jpg
│ │ │ ├── ma1987.jpg
│ │ │ ├── md2006.jpg
│ │ │ ├── md2006b.jpg
│ │ │ ├── md2006c.jpg
│ │ │ ├── me1999.jpg
│ │ │ ├── me1999b.jpg
│ │ │ ├── mi2007.jpg
│ │ │ ├── mn2000.jpg
│ │ │ ├── mo2006b.jpg
│ │ │ ├── mo2009.jpg
│ │ │ ├── ms2003.jpg
│ │ │ ├── mt2010.jpg
│ │ │ ├── nc1982.jpg
│ │ │ ├── nd1993.jpg
│ │ │ ├── ne2005.jpg
│ │ │ ├── nh1999.jpg
│ │ │ ├── nj1993.jpg
│ │ │ ├── nm2010.jpg
│ │ │ ├── nv2001.jpg
│ │ │ ├── ny2010.jpg
│ │ │ ├── oh2004.jpg
│ │ │ ├── ok2009.jpg
│ │ │ ├── or1990.jpg
│ │ │ ├── pa2004.jpg
│ │ │ ├── ri1996.jpg
│ │ │ ├── sc2008.jpg
│ │ │ ├── sd2007.jpg
│ │ │ ├── tn2007.jpg
│ │ │ ├── tx2009.jpg
│ │ │ ├── ut2009.jpg
│ │ │ ├── va2003.jpg
│ │ │ ├── vt1985.jpg
│ │ │ ├── wa1998.jpg
│ │ │ ├── wi2007.jpg
│ │ │ ├── wv1995.jpg
│ │ │ └── wy2000.jpg
│ │ ├── ocr
│ │ └── tessdata
│ │ │ ├── leu.traineddata
│ │ │ └── lus.traineddata
│ │ ├── postprocess
│ │ ├── eu.patterns
│ │ ├── readme.txt
│ │ └── us.patterns
│ │ └── region
│ │ ├── eu.xml
│ │ └── us.xml
│ ├── java
│ └── org
│ │ └── openalpr
│ │ ├── AlprJNIWrapper.java
│ │ ├── OpenALPR.java
│ │ ├── model
│ │ ├── Candidate.java
│ │ ├── Coordinate.java
│ │ ├── Result.java
│ │ ├── Results.java
│ │ └── ResultsError.java
│ │ └── util
│ │ └── Utils.java
│ └── jniLibs
│ └── armeabi-v7a
│ ├── liblept.so
│ ├── libopenalpr-native.so
│ ├── libopencv_java.so
│ └── libtess.so
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── images
├── screencast.gif
└── screenshot.png
├── openalpr.conf
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | # Gradle files
2 | .gradle/
3 | build/
4 |
5 | # Log Files
6 | *.log
7 |
8 | # Android Studio / IntelliJ IDEA
9 | *.iws
10 | .idea/
11 | *.iml
12 | local.properties
13 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## [1.1.2](https://github.com/SandroMachado/openalpr-android/tree/1.1.2) (2017-03-09)
4 | [Full Changelog](https://github.com/SandroMachado/openalpr-android/compare/1.1.1...1.1.2)
5 |
6 | **Closed issues:**
7 |
8 | - Error initializing OpenALPR [\#42](https://github.com/SandroMachado/openalpr-android/issues/42)
9 | - I'm getting an error [\#40](https://github.com/SandroMachado/openalpr-android/issues/40)
10 | - Can I specify country settings in openalpr.config [\#39](https://github.com/SandroMachado/openalpr-android/issues/39)
11 | - Error :\( [\#38](https://github.com/SandroMachado/openalpr-android/issues/38)
12 | - I don't know why it doesn't work... [\#36](https://github.com/SandroMachado/openalpr-android/issues/36)
13 | - Upgrade the dependency `Libpng library` to allow submission to `Play Store` [\#35](https://github.com/SandroMachado/openalpr-android/issues/35)
14 | - Openalpr is Apache 2.0 but original openalpr is AGPL 3.0. Which license affects me? [\#32](https://github.com/SandroMachado/openalpr-android/issues/32)
15 | - issue in changing package name [\#29](https://github.com/SandroMachado/openalpr-android/issues/29)
16 | - seems couldn't recognize words? [\#21](https://github.com/SandroMachado/openalpr-android/issues/21)
17 | - How to pass multiple country code? [\#20](https://github.com/SandroMachado/openalpr-android/issues/20)
18 | - Pass image as byte array not as file path [\#18](https://github.com/SandroMachado/openalpr-android/issues/18)
19 | - No module found [\#17](https://github.com/SandroMachado/openalpr-android/issues/17)
20 | - Failed to resolve: com.github.SandroMachado:openalpr-android:1.1.0 [\#16](https://github.com/SandroMachado/openalpr-android/issues/16)
21 | - libopenalpr-native.so & libopencv\_java.so [\#15](https://github.com/SandroMachado/openalpr-android/issues/15)
22 | - library "libopencv\_java.so" not found [\#14](https://github.com/SandroMachado/openalpr-android/issues/14)
23 | - library "libopencv\_java.so" not found [\#13](https://github.com/SandroMachado/openalpr-android/issues/13)
24 |
25 | **Merged pull requests:**
26 |
27 | - Update libpng library [\#44](https://github.com/SandroMachado/openalpr-android/pull/44) ([SandroMachado](https://github.com/SandroMachado))
28 | - Multiple code quality fix-2 [\#28](https://github.com/SandroMachado/openalpr-android/pull/28) ([faisal-hameed](https://github.com/faisal-hameed))
29 | - Code quality fix - Utility classes should not have public constructors. [\#26](https://github.com/SandroMachado/openalpr-android/pull/26) ([faisal-hameed](https://github.com/faisal-hameed))
30 | - Code quality fix - Method names should comply with a naming convention. [\#25](https://github.com/SandroMachado/openalpr-android/pull/25) ([faisal-hameed](https://github.com/faisal-hameed))
31 | - Code quality fix - Declarations should use Java collection interfaces such as "List" rather than specific implementation. [\#24](https://github.com/SandroMachado/openalpr-android/pull/24) ([faisal-hameed](https://github.com/faisal-hameed))
32 | - Update README.md [\#23](https://github.com/SandroMachado/openalpr-android/pull/23) ([gas83](https://github.com/gas83))
33 | - Update README.md [\#22](https://github.com/SandroMachado/openalpr-android/pull/22) ([gas83](https://github.com/gas83))
34 |
35 | ## [1.1.1](https://github.com/SandroMachado/openalpr-android/tree/1.1.1) (2016-01-14)
36 | [Full Changelog](https://github.com/SandroMachado/openalpr-android/compare/1.1.0...1.1.1)
37 |
38 | **Merged pull requests:**
39 |
40 | - Update JitPack badge [\#11](https://github.com/SandroMachado/openalpr-android/pull/11) ([SandroMachado](https://github.com/SandroMachado))
41 | - Add portuguese licence plate key points [\#10](https://github.com/SandroMachado/openalpr-android/pull/10) ([SandroMachado](https://github.com/SandroMachado))
42 | - \#4 Added new keypoint folder for Europe with Polish LP placeholders [\#9](https://github.com/SandroMachado/openalpr-android/pull/9) ([JerzyPuchalski](https://github.com/JerzyPuchalski))
43 | - Created a folder on /sdcard/ for all images captured [\#8](https://github.com/SandroMachado/openalpr-android/pull/8) ([ZKjellberg](https://github.com/ZKjellberg))
44 |
45 | ## [1.1.0](https://github.com/SandroMachado/openalpr-android/tree/1.1.0) (2016-01-06)
46 | [Full Changelog](https://github.com/SandroMachado/openalpr-android/compare/1.0.1...1.1.0)
47 |
48 | **Fixed bugs:**
49 |
50 | - \[Sample Application\] State Lost on Rotation [\#6](https://github.com/SandroMachado/openalpr-android/issues/6)
51 | - \[Sample Application\] Crash on Invalid Submission [\#5](https://github.com/SandroMachado/openalpr-android/issues/5)
52 |
53 | **Closed issues:**
54 |
55 | - Crash during EU recognizing [\#4](https://github.com/SandroMachado/openalpr-android/issues/4)
56 | - Crash caused by missing libopenalpr-native.so [\#1](https://github.com/SandroMachado/openalpr-android/issues/1)
57 |
58 | **Merged pull requests:**
59 |
60 | - Long list of improvements [\#7](https://github.com/SandroMachado/openalpr-android/pull/7) ([ZKjellberg](https://github.com/ZKjellberg))
61 | - IntelliJ Files Cleanup [\#3](https://github.com/SandroMachado/openalpr-android/pull/3) ([ZKjellberg](https://github.com/ZKjellberg))
62 |
63 | ## [1.0.1](https://github.com/SandroMachado/openalpr-android/tree/1.0.1) (2015-12-17)
64 | [Full Changelog](https://github.com/SandroMachado/openalpr-android/compare/1.0.0...1.0.1)
65 |
66 | **Merged pull requests:**
67 |
68 | - Implemented permission check [\#2](https://github.com/SandroMachado/openalpr-android/pull/2) ([ZKjellberg](https://github.com/ZKjellberg))
69 |
70 | ## [1.0.0](https://github.com/SandroMachado/openalpr-android/tree/1.0.0) (2015-12-13)
71 |
72 |
73 | \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
203 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # openalpr-android
2 | [](https://jitpack.io/#SandroMachado/openalpr-android)
3 |
4 | OpenALPR is an open source Automatic License Plate Recognition library written in C++ with bindings in C#, Java, Node.js, and Python. This project ports this library to Android. You can find the demo application `apk` at the [releases](https://github.com/SandroMachado/openalpr-android/releases) tab.
5 |
6 | 
7 |
8 | # Gradle Dependency
9 |
10 | ## Repository
11 |
12 | First, add the following to your app's `build.gradle` file:
13 |
14 | ```Gradle
15 | repositories {
16 | maven { url "https://jitpack.io" }
17 | }
18 | ```
19 |
20 | Them include the openalpr-android dependency:
21 |
22 | ```gradle
23 | dependencies {
24 |
25 | // ... other dependencies here.
26 | compile 'com.github.SandroMachado:openalpr-android:1.1.2'
27 | }
28 | ```
29 |
30 | # Usage
31 |
32 | ## Code
33 |
34 | Copy the [OpenALPR configuration file](./openalpr.conf) to your android project assets directory `/main/assets/runtime_data/openalpr.conf`, open it and update the `runtime_dir` to your project directory (for instance, for the sample project the directory is: `runtime_dir = /data/data/com.sandro.openalprsample/runtime_data`). After that just follow the code example bellow. To see a full example check the [sample application](./Sample/OpenALPRSample/app/src/main/java/com/sandro/openalprsample/MainActivity.java).
35 |
36 | ```Java
37 |
38 | static final String ANDROID_DATA_DIR = "/data/data/com.sandro.openalprsample";
39 |
40 | final String openAlprConfFile = ANDROID_DATA_DIR + File.separatorChar + "runtime_data" + File.separatorChar + "openalpr.conf";
41 |
42 | String result = OpenALPR.Factory.create(MainActivity.this, ANDROID_DATA_DIR).recognizeWithCountryRegionNConfig("us", "", image.getAbsolutePath(), openAlprConfFile, 10);
43 | ```
44 |
45 | ## Interface
46 |
47 | ```Java
48 | /*
49 | Method interface.
50 | */
51 |
52 | /**
53 | * Recognizes the licence plate.
54 | *
55 | * @param country - Country code to identify (either us for USA or eu for Europe). Default=us.
56 | * @param region - Attempt to match the plate number against a region template (e.g., md for Maryland, ca for California).
57 | * @param imgFilePath - Image containing the license plate.
58 | * @param configFilePath - Config file path (default /etc/openalpr/openalpr.conf)
59 | * @param topN - Max number of possible plate numbers to return(default 10)
60 | *
61 | * @return - JSON string of results
62 | */
63 |
64 | public String recognizeWithCountryRegionNConfig(String country, String region, String configFilePath, String imgFilePath, int topN);
65 |
66 | ```
67 | # Sample Application
68 |
69 | The repository also includes a [sample application](./Sample/OpenALPRSample) that can be tested with Android Studio.
70 |
71 | 
72 |
73 | # Credits
74 |
75 | - [OpenALPR](https://github.com/openalpr/openalpr) Parent Project
76 | - [OpenAlprDroidApp](https://github.com/sujaybhowmick/OpenAlprDroidApp) for the compiled sources and sample that helped port the project to an android library
77 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/.gitignore:
--------------------------------------------------------------------------------
1 | # Gradle files
2 | .gradle/
3 | build/
4 |
5 | # Log Files
6 | *.log
7 |
8 | # Android Studio / IntelliJ IDEA
9 | *.iws
10 | .idea/
11 | *.iml
12 | local.properties
13 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | /build
3 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.1"
6 |
7 | defaultConfig {
8 | applicationId "com.sandro.openalprsample"
9 | minSdkVersion 16
10 | targetSdkVersion 23
11 | versionCode 1
12 | versionName "1.1.2"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | compile project(':OpenALPR')
25 | compile 'com.android.support:appcompat-v7:23.1.1'
26 | compile 'com.google.code.gson:gson:2.5'
27 | compile 'com.squareup.picasso:picasso:2.5.2'
28 | }
29 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/sandromachado/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | -keep class org.openalpr.model.** { *; }
20 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/assets/runtime_data/openalpr.conf:
--------------------------------------------------------------------------------
1 | [common]
2 |
3 | ; Specify the path to the runtime data directory
4 | runtime_dir = /data/data/com.sandro.openalprsample/runtime_data
5 |
6 |
7 | ocr_img_size_percent = 1.33333333
8 | state_id_img_size_percent = 2.0
9 |
10 | ; detection will ignore plates that are too large. This is a good efficiency technique to use if the
11 | ; plates are going to be a fixed distance away from the camera (e.g., you will never see plates that fill
12 | ; up the entire image
13 | max_plate_width_percent = 100
14 | max_plate_height_percent = 100
15 |
16 | ; detection_iteration_increase is the percentage that the LBP frame increases each iteration.
17 | ; It must be greater than 1.0. A value of 1.01 means increase by 1%, 1.10 increases it by 10% each time.
18 | ; So a 1% increase would be ~10x slower than 10% to process, but it has a higher chance of landing
19 | ; directly on the plate and getting a strong detection
20 | detection_iteration_increase = 1.1
21 |
22 | ; The minimum detection strength determines how sure the detection algorithm must be before signaling that
23 | ; a plate region exists. Technically this corresponds to LBP nearest neighbors (e.g., how many detections
24 | ; are clustered around the same area). For example, 2 = very lenient, 9 = very strict.
25 | detection_strictness = 3
26 |
27 | ; The detection doesn't necessarily need an extremely high resolution image in order to detect plates
28 | ; Using a smaller input image should still find the plates and will do it faster
29 | ; Tweaking the max_detection_input values will resize the input image if it is larger than these sizes
30 | ; max_detection_input_width/height are specified in pixels
31 | max_detection_input_width = 1280
32 | max_detection_input_height = 720
33 |
34 | opencl_enabled = 0
35 | multithreading_cores = 1
36 |
37 |
38 |
39 | max_plate_angle_degrees = 15
40 |
41 | ocr_min_font_point = 6
42 |
43 | ; Minimum OCR confidence percent to consider.
44 | postprocess_min_confidence = 65
45 |
46 | ; Any OCR character lower than this will also add an equally likely
47 | ; chance that the character is incorrect and will be skipped. Value is a confidence percent
48 | postprocess_confidence_skip_level = 80
49 |
50 | ; Reduces the total permutations to consider for scoring.
51 | postprocess_max_substitutions = 2
52 |
53 | ; Results with fewer characters will be discarded
54 | postprocess_min_characters = 4
55 | postprocess_max_characters = 8
56 |
57 | [debug]
58 | general = 0
59 | timing = 0
60 | state_id = 0
61 | plate_lines = 0
62 | plate_corners = 0
63 | char_regions = 0
64 | char_segment = 0
65 | char_analysis = 0
66 | color_filter = 0
67 | ocr = 0
68 | postprocess = 0
69 | show_images = 0
70 | pause_on_frame = 0
71 |
72 | ;;; Country Specific variables ;;;;
73 |
74 | [us]
75 |
76 | ; 30-50, 40-60, 50-70, 60-80
77 | char_analysis_min_pct = 0.30
78 | char_analysis_height_range = 0.20
79 | char_analysis_height_step_size = 0.10
80 | char_analysis_height_num_steps = 4
81 |
82 | segmentation_min_box_width_px = 4
83 | segmentation_min_charheight_percent = 0.5;
84 | segmentation_max_segment_width_percent_vs_average = 1.35;
85 |
86 | plate_width_mm = 304.8
87 | plate_height_mm = 152.4
88 |
89 | char_height_mm = 70
90 | char_width_mm = 35
91 | char_whitespace_top_mm = 38
92 | char_whitespace_bot_mm = 38
93 |
94 | template_max_width_px = 120
95 | template_max_height_px = 60
96 |
97 | ; Higher sensitivity means less lines
98 | plateline_sensitivity_vertical = 25
99 | plateline_sensitivity_horizontal = 45
100 |
101 | ; Regions smaller than this will be disqualified
102 | min_plate_size_width_px = 70
103 | min_plate_size_height_px = 35
104 |
105 | ocr_language = lus
106 |
107 | [eu]
108 |
109 | ; 35-50; 45-60, 55-70, 65-80, 75-90
110 | char_analysis_min_pct = 0.35
111 | char_analysis_height_range = 0.15
112 | char_analysis_height_step_size = 0.10
113 | char_analysis_height_num_steps = 5
114 |
115 | segmentation_min_box_width_px = 5
116 | segmentation_min_charheight_percent = 0.4;
117 | segmentation_max_segment_width_percent_vs_average = 2.0;
118 |
119 | plate_width_mm = 520
120 | plate_height_mm = 110
121 |
122 | char_height_mm = 80
123 | char_width_mm = 53
124 | char_whitespace_top_mm = 10
125 | char_whitespace_bot_mm = 10
126 |
127 | template_max_width_px = 184
128 | template_max_height_px = 46
129 |
130 | ; Higher sensitivity means less lines
131 | plateline_sensitivity_vertical = 18
132 | plateline_sensitivity_horizontal = 55
133 |
134 | ; Regions smaller than this will be disqualified
135 | min_plate_size_width_px = 100
136 | min_plate_size_height_px = 20
137 |
138 | ocr_language = leu
139 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/Sample/OpenALPRSample/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/java/com/sandro/openalprsample/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.sandro.openalprsample;
2 |
3 | import android.Manifest;
4 | import android.app.Activity;
5 | import android.app.ProgressDialog;
6 | import android.content.Context;
7 | import android.content.Intent;
8 | import android.content.pm.PackageManager;
9 | import android.graphics.Bitmap;
10 | import android.graphics.BitmapFactory;
11 | import android.graphics.Canvas;
12 | import android.graphics.Color;
13 | import android.graphics.Paint;
14 | import android.graphics.Rect;
15 | import android.graphics.RectF;
16 | import android.graphics.Typeface;
17 | import android.graphics.drawable.BitmapDrawable;
18 | import android.graphics.drawable.Drawable;
19 | import android.net.Uri;
20 | import android.os.AsyncTask;
21 | import android.os.Bundle;
22 | import android.os.Environment;
23 | import android.provider.MediaStore;
24 | import android.support.v4.app.ActivityCompat;
25 | import android.support.v4.content.ContextCompat;
26 | import android.support.v7.app.AppCompatActivity;
27 | import android.transition.Explode;
28 | import android.util.Log;
29 | import android.view.View;
30 | import android.view.ViewGroup;
31 | import android.widget.EditText;
32 | import android.widget.ImageView;
33 | import android.widget.TableLayout;
34 | import android.widget.TableRow;
35 | import android.widget.TextView;
36 | import android.widget.Toast;
37 |
38 | import com.google.gson.Gson;
39 | import com.google.gson.JsonSyntaxException;
40 | import com.squareup.picasso.Picasso;
41 |
42 | import org.openalpr.OpenALPR;
43 | import org.openalpr.model.Candidate;
44 | import org.openalpr.model.Coordinate;
45 | import org.openalpr.model.Result;
46 | import org.openalpr.model.Results;
47 | import org.openalpr.model.ResultsError;
48 |
49 | import java.io.File;
50 | import java.text.SimpleDateFormat;
51 | import java.util.ArrayList;
52 | import java.util.Date;
53 | import java.util.HashMap;
54 | import java.util.List;
55 | import java.util.Locale;
56 | import java.util.Map;
57 |
58 |
59 | public class MainActivity extends AppCompatActivity {
60 |
61 | private final int REQUEST_IMAGE = 100;
62 | private final int REQUEST_FILE = 42;
63 | private final int STORAGE = 1;
64 |
65 | private String ANDROID_DATA_DIR;
66 | private File imgFolder;
67 | private File imageFile;
68 |
69 | private Context appCtx;
70 | private ImageView imageView;
71 | private EditText txtCountry;
72 | private EditText txtRegion;
73 | private EditText txtCandidatesNum;
74 | private TableLayout resultTable;
75 |
76 | @Override
77 | protected void onCreate(Bundle savedInstanceState) {
78 | super.onCreate(savedInstanceState);
79 | setContentView(R.layout.activity_main);
80 | checkPermission();
81 |
82 | appCtx = this;
83 | ANDROID_DATA_DIR = this.getApplicationInfo().dataDir;
84 |
85 | txtCandidatesNum = (EditText) findViewById(R.id.txtCandidatesNum);
86 | txtCountry = (EditText) findViewById(R.id.txtCountry);
87 | txtRegion = (EditText) findViewById(R.id.txtRegion);
88 |
89 | resultTable = (TableLayout) findViewById(R.id.resultTable);
90 | imageView = (ImageView) findViewById(R.id.imageView);
91 |
92 | findViewById(R.id.btnTakePicture).setOnClickListener(new View.OnClickListener() {
93 | @Override
94 | public void onClick(View view) {
95 | takePicture();
96 | }
97 | });
98 |
99 | findViewById(R.id.btnLoad).setOnClickListener(new View.OnClickListener() {
100 | @Override
101 | public void onClick(View view) {
102 | loadPicture();
103 | }
104 | });
105 |
106 | findViewById(R.id.btnClear).setOnClickListener(new View.OnClickListener() {
107 | @Override
108 | public void onClick(View view) {
109 | resultTable.setVisibility(View.GONE);
110 | int count = resultTable.getChildCount();
111 | for (int i = 1; i < count; i++) {
112 | View child = resultTable.getChildAt(i);
113 | if (child instanceof TableRow) ((ViewGroup) child).removeAllViews();
114 | }
115 | Toast.makeText(appCtx, "Result table cleared!", Toast.LENGTH_LONG).show();
116 | }
117 | });
118 |
119 | findViewById(R.id.btnFlushDir).setOnClickListener(new View.OnClickListener() {
120 | @Override
121 | public void onClick(View view) {
122 | int cont = 0;
123 | for (File file : imgFolder.listFiles()) {
124 | if (file.delete()) ++cont;
125 | }
126 | Toast.makeText(appCtx, cont + " files deleted successfully!", Toast.LENGTH_LONG).show();
127 | }
128 | });
129 |
130 | imgFolder = new File(Environment.getExternalStorageDirectory() + "/OpenALPR/");
131 | if (!imgFolder.exists()) {
132 | imgFolder.mkdir();
133 | }
134 | }
135 |
136 | @Override
137 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
138 | if ((requestCode == REQUEST_IMAGE || requestCode == REQUEST_FILE) && resultCode == Activity.RESULT_OK) {
139 | final long startTime = System.currentTimeMillis();
140 | final long[] endTime = new long[1];
141 | final ProgressDialog progress = ProgressDialog.show(this, "Loading", "Parsing result...", true);
142 | final String openAlprConfFile = ANDROID_DATA_DIR + File.separatorChar + "runtime_data" + File.separatorChar + "openalpr.conf";
143 | BitmapFactory.Options options = new BitmapFactory.Options();
144 | options.inSampleSize = 10;
145 |
146 | if (requestCode == REQUEST_FILE) {
147 | if (data != null && data.getData() != null) {
148 | String path = Environment.getExternalStorageDirectory().getPath() + "/" + data.getData().getLastPathSegment().split(":")[1];
149 | imageFile = new File(path);
150 | Picasso.with(MainActivity.this).invalidate(imageFile);
151 | }
152 | }
153 |
154 | final int[] x1 = { 0 };
155 | final int[] x2 = { 0 };
156 | final int[] y1 = { 0 };
157 | final int[] y2 = { 0 };
158 | final String[] plate = {""};
159 |
160 | AsyncTask.execute(new Runnable() {
161 |
162 | @Override
163 | public void run() {
164 |
165 | int candidates = txtCandidatesNum.getText().toString().isEmpty()? 5 : Integer.parseInt((txtCandidatesNum.getText().toString()));
166 | String result = OpenALPR.Factory.create(MainActivity.this, ANDROID_DATA_DIR).recognizeWithCountryRegionNConfig(txtCountry.getText().toString(), txtRegion.getText().toString(), imageFile.getAbsolutePath(), openAlprConfFile, candidates);
167 | Log.d("OPEN ALPR", result);
168 |
169 | try {
170 | final Results results = new Gson().fromJson(result, Results.class);
171 | runOnUiThread(new Runnable() {
172 | @Override
173 | public void run() {
174 | resultTable.setVisibility(View.VISIBLE);
175 | if (results == null || results.getResults() == null || results.getResults().size() == 0) {
176 | Toast.makeText(MainActivity.this, "It was not possible to detect the licence plate.", Toast.LENGTH_LONG).show();
177 | } else {
178 | endTime[0] = System.currentTimeMillis();
179 | TableLayout.LayoutParams rowLayoutParams = new TableLayout.LayoutParams(TableLayout.LayoutParams.FILL_PARENT, TableLayout.LayoutParams.WRAP_CONTENT);
180 | TableRow.LayoutParams cellLayoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT);
181 |
182 | List resultsList = results.getResults();
183 | for(int i = 0; i < resultsList.size(); ++i) {
184 | Result result = resultsList.get(i);
185 |
186 | if (i == 0) { // save rectangle coordinates and plate of best result
187 | x1[0] = result.getCoordinates().get(0).getX();
188 | y1[0] = result.getCoordinates().get(0).getY();
189 | x2[0] = result.getCoordinates().get(2).getX();
190 | y2[0] = result.getCoordinates().get(2).getY();
191 | plate[0] = result.getPlate();
192 | }
193 |
194 | TableRow tableRow = new TableRow(appCtx);
195 | tableRow.setLayoutParams(rowLayoutParams);
196 |
197 | if (result.getConfidence() < 60)
198 | tableRow.setBackgroundColor(Color.RED);
199 | else if (result.getConfidence() < 85)
200 | tableRow.setBackgroundColor(Color.YELLOW);
201 | else if (result.getConfidence() >= 85)
202 | tableRow.setBackgroundColor(Color.GREEN);
203 |
204 | TextView cellValue = new TextView(appCtx);
205 | cellValue.setTypeface(null, Typeface.BOLD);
206 | cellValue.setText(result.getPlate());
207 | cellValue.setLayoutParams(cellLayoutParams);
208 | tableRow.addView(cellValue);
209 |
210 | cellValue = new TextView(appCtx);
211 | cellValue.setTypeface(null, Typeface.BOLD);
212 | cellValue.setText(String.format("%.2f", result.getConfidence())+"%");
213 | cellValue.setLayoutParams(cellLayoutParams);
214 | tableRow.addView(cellValue);
215 |
216 | String region = txtCountry.getText().toString()+"_"+txtRegion.getText().toString();
217 | cellValue = new TextView(appCtx);
218 | cellValue.setTypeface(null, Typeface.BOLD);
219 | cellValue.setText(region.length() == 1? "n/a" : region);
220 | cellValue.setLayoutParams(cellLayoutParams);
221 | tableRow.addView(cellValue);
222 |
223 | cellValue = new TextView(appCtx);
224 | cellValue.setTypeface(null, Typeface.BOLD);
225 | cellValue.setText(String.format("%.2f", result.getMatchesTemplate()));
226 | cellValue.setLayoutParams(cellLayoutParams);
227 | tableRow.addView(cellValue);
228 |
229 | cellValue = new TextView(appCtx);
230 | cellValue.setTypeface(null, Typeface.BOLD);
231 | cellValue.setText(String.format("%.2f", ((result.getProcessingTimeMs() / 1000.0) % 60)) + " s");
232 | cellValue.setLayoutParams(cellLayoutParams);
233 | tableRow.addView(cellValue);
234 |
235 | resultTable.addView(tableRow);
236 | List candidates = result.getCandidates();
237 | for (int j = 1; j < candidates.size(); ++j) {
238 | Candidate candidate = candidates.get(j);
239 | tableRow = new TableRow(appCtx);
240 | tableRow.setLayoutParams(rowLayoutParams);
241 | tableRow.setBackgroundColor(Color.LTGRAY);
242 |
243 | cellValue = new TextView(appCtx);
244 | cellValue.setText(candidate.getPlate());
245 | cellValue.setLayoutParams(cellLayoutParams);
246 | tableRow.addView(cellValue, 0);
247 |
248 | cellValue = new TextView(appCtx);
249 | cellValue.setText(String.format("%.2f", candidate.getConfidence())+"%");
250 | cellValue.setLayoutParams(cellLayoutParams);
251 | tableRow.addView(cellValue, 1);
252 |
253 | tableRow.addView(new TextView(appCtx), 2);
254 |
255 | cellValue = new TextView(appCtx);
256 | cellValue.setText(String.valueOf(candidate.getMatchesTemplate()));
257 | cellValue.setLayoutParams(cellLayoutParams);
258 | tableRow.addView(cellValue, 3);
259 | resultTable.addView(tableRow);
260 | }
261 | }
262 | resultTable.invalidate();
263 | Toast.makeText(appCtx, "Processing time: " + String.format("%.2f", (((endTime[0]-startTime) / 1000.0) % 60)) + " s", Toast.LENGTH_LONG).show();
264 | }
265 | }
266 | });
267 |
268 | } catch (JsonSyntaxException exception) {
269 | final ResultsError resultsError = new Gson().fromJson(result, ResultsError.class);
270 |
271 | runOnUiThread(new Runnable() {
272 | @Override
273 | public void run() {
274 | Toast.makeText(appCtx, resultsError.getMsg(), Toast.LENGTH_LONG).show();
275 | }
276 | });
277 | }
278 |
279 | progress.dismiss();
280 |
281 | runOnUiThread(new Runnable() {
282 | @Override
283 | public void run() {
284 | // Picasso requires permission.WRITE_EXTERNAL_STORAGE
285 | Picasso.with(MainActivity.this).load(imageFile).fit().centerCrop().into(imageView);
286 | if (imageView.getDrawable() != null) {
287 | Bitmap bitmap = ((BitmapDrawable) imageView.getDrawable()).getBitmap();
288 | Bitmap originalBitmap = BitmapFactory.decodeFile(imageFile.getAbsolutePath(), new BitmapFactory.Options());
289 |
290 | float viewWidth = bitmap.getWidth();
291 | float viewHeigth = bitmap.getHeight();
292 | float originalWidth = originalBitmap.getWidth();
293 | float originalHeigth = originalBitmap.getHeight();
294 |
295 | Canvas canvas = new Canvas(bitmap);
296 | Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
297 | paint.setColor(Color.GREEN);
298 | paint.setStyle(Paint.Style.STROKE);
299 | paint.setStrokeWidth(8);
300 |
301 | // map rectangle coordinates to imageview
302 | int p1_x = (int)((x1[0] * viewWidth) / originalWidth);
303 | int p1_y = (int)((y1[0] * viewHeigth) / originalHeigth);
304 | int p2_x = (int)((x2[0] * viewWidth) / originalWidth);
305 | int p2_y = (int)((y2[0] * viewHeigth) / originalHeigth);
306 | canvas.drawRect(new Rect(p1_x, p1_y, p2_x, p2_y), paint);
307 |
308 | paint.setTextSize(75);
309 | paint.setStyle(Paint.Style.FILL);
310 | paint.setTypeface(Typeface.DEFAULT_BOLD);
311 | paint.setColor(Color.YELLOW);
312 | canvas.drawText(plate[0], p1_x, p1_y-10, paint);
313 | imageView.setImageBitmap(bitmap);
314 | }
315 | }
316 | });
317 | }
318 | });
319 | }
320 | }
321 |
322 | private void checkPermission() {
323 | List permissions = new ArrayList<>();
324 | if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
325 | permissions.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
326 | }
327 | if (!permissions.isEmpty()) {
328 | Toast.makeText(this, "Storage access needed to manage the picture.", Toast.LENGTH_LONG).show();
329 | String[] params = permissions.toArray(new String[permissions.size()]);
330 | ActivityCompat.requestPermissions(this, params, STORAGE);
331 | }
332 | }
333 |
334 | @Override
335 | public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
336 | switch (requestCode) {
337 | case STORAGE:{
338 | Map perms = new HashMap<>();
339 | // Initial
340 | perms.put(Manifest.permission.WRITE_EXTERNAL_STORAGE, PackageManager.PERMISSION_GRANTED);
341 | // Fill with results
342 | for (int i = 0; i < permissions.length; i++)
343 | perms.put(permissions[i], grantResults[i]);
344 | // Check for WRITE_EXTERNAL_STORAGE
345 | Boolean storage = perms.get(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED;
346 | if (storage) {
347 | // permission was granted, yay!
348 | } else {
349 | // Permission Denied
350 | Toast.makeText(this, "Storage permission is needed to analyse the picture.", Toast.LENGTH_LONG).show();
351 | }
352 | }
353 | default:
354 | break;
355 | }
356 | }
357 |
358 | public String dateToString(Date date, String format) {
359 | SimpleDateFormat df = new SimpleDateFormat(format, Locale.getDefault());
360 |
361 | return df.format(date);
362 | }
363 |
364 | public void takePicture() {
365 | // Generate the path for the next photo
366 | String name = dateToString(new Date(), "yyyy-MM-dd-hh-mm-ss");
367 | imageFile = new File(imgFolder, name + ".jpg");
368 |
369 | Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
370 | intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
371 | startActivityForResult(intent, REQUEST_IMAGE);
372 | }
373 |
374 | public void loadPicture() {
375 | Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
376 | intent.addCategory(Intent.CATEGORY_OPENABLE);
377 | intent.setType("image/*");
378 | startActivityForResult(intent, REQUEST_FILE);
379 | }
380 |
381 | @Override
382 | protected void onResume() {
383 | super.onResume();
384 | if (imageFile != null) {// Picasso does not seem to have an issue with a null value, but to be safe
385 | Picasso.with(MainActivity.this).load(imageFile).fit().centerCrop().into(imageView);
386 | }
387 | }
388 |
389 | }
390 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
18 |
19 |
26 |
27 |
31 |
32 |
39 |
40 |
47 |
48 |
49 |
53 |
54 |
59 |
60 |
65 |
66 |
71 |
72 |
73 |
78 |
79 |
82 |
83 |
89 |
90 |
94 |
95 |
102 |
103 |
109 |
110 |
116 |
117 |
123 |
124 |
130 |
131 |
132 |
133 |
134 |
135 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/Sample/OpenALPRSample/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/Sample/OpenALPRSample/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/Sample/OpenALPRSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/Sample/OpenALPRSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/Sample/OpenALPRSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | OpenALPRSample
3 |
4 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.5.0'
9 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
10 |
11 | // NOTE: Do not place your application dependencies here; they belong
12 | // in the individual module build.gradle files
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | jcenter()
19 | }
20 | }
21 |
22 | task clean(type: Delete) {
23 | delete rootProject.buildDir
24 | }
25 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Oct 21 11:34:03 PDT 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
7 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/Sample/OpenALPRSample/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':OpenALPR'
2 |
3 | project(':OpenALPR').projectDir = new File('../../app')
4 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | /build
3 |
--------------------------------------------------------------------------------
/app/.idea/.name:
--------------------------------------------------------------------------------
1 | app
--------------------------------------------------------------------------------
/app/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
16 |
17 |
--------------------------------------------------------------------------------
/app/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 | localhost
144 | 5050
145 |
146 |
147 |
148 |
149 |
150 |
151 | 1450034574040
152 |
153 | 1450034574040
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'com.github.dcendents.android-maven'
3 |
4 | group='com.github.SandroMachado'
5 |
6 | android {
7 | compileSdkVersion 23
8 | buildToolsVersion "23.0.1"
9 |
10 | defaultConfig {
11 | minSdkVersion 16
12 | targetSdkVersion 23
13 | versionCode 1
14 | versionName "1.0.1"
15 | }
16 | buildTypes {
17 | release {
18 | minifyEnabled false
19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20 | }
21 | }
22 | }
23 |
24 | dependencies {
25 | compile fileTree(dir: 'libs', include: ['*.jar'])
26 | }
27 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/sandromachado/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/au.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/au.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/be.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/be.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/bg.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/cy.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/cy.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/de.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/de.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/dk.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/dk.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/eng.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/eng.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/es2000.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/es2000.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/es2006.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/es2006.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/est.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/est.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/fr.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/fr.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/gb2000.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/gb2000.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/gb2006.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/gb2006.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/it.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/it.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/nl.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/nl.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/pl2000.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/pl2000.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/pl2006.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/pl2006.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/pt1992.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/pt1992.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/eu/pt1998.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/eu/pt1998.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ak2008.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ak2008.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/al2002.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/al2002.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ar2006.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ar2006.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/az1996.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/az1996.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ca1993.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ca1993.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/co2000.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/co2000.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ct2000.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ct2000.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/dc2003.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/dc2003.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/de1970.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/de1970.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/fl2004.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/fl2004.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ga2007.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ga2007.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/hi1991.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/hi1991.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ia1997.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ia1997.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/id2006.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/id2006.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/il2002.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/il2002.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/in2009.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/in2009.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ks2007b.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ks2007b.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ky2005.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ky2005.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/la2006.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/la2006.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ma1987.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ma1987.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/md2006.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/md2006.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/md2006b.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/md2006b.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/md2006c.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/md2006c.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/me1999.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/me1999.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/me1999b.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/me1999b.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/mi2007.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/mi2007.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/mn2000.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/mn2000.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/mo2006b.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/mo2006b.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/mo2009.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/mo2009.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ms2003.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ms2003.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/mt2010.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/mt2010.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/nc1982.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/nc1982.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/nd1993.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/nd1993.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ne2005.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ne2005.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/nh1999.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/nh1999.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/nj1993.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/nj1993.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/nm2010.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/nm2010.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/nv2001.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/nv2001.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ny2010.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ny2010.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/oh2004.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/oh2004.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ok2009.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ok2009.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/or1990.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/or1990.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/pa2004.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/pa2004.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ri1996.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ri1996.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/sc2008.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/sc2008.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/sd2007.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/sd2007.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/tn2007.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/tn2007.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/tx2009.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/tx2009.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/ut2009.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/ut2009.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/va2003.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/va2003.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/vt1985.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/vt1985.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/wa1998.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/wa1998.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/wi2007.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/wi2007.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/wv1995.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/wv1995.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/keypoints/us/wy2000.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/keypoints/us/wy2000.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/ocr/tessdata/leu.traineddata:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/ocr/tessdata/leu.traineddata
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/ocr/tessdata/lus.traineddata:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/assets/runtime_data/ocr/tessdata/lus.traineddata
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/postprocess/eu.patterns:
--------------------------------------------------------------------------------
1 | ad @####
2 |
3 | al @@###@@
4 |
5 | am ###@@###
6 | am ##@@###
7 | am ###@@##
8 | am ##@@##
9 |
10 | at @@???
11 | at @@????
12 | at @@?????
13 | at @@??????
14 | at @???
15 | at @????
16 | at @?????
17 | at @??????
18 |
19 | az ##@@###
20 |
21 | ba [AEJKMOT]##[AEJKMOT]###
22 | ba [T][A]######
23 | ba [T][T]######
24 | ba ######[AEJKT]
25 |
26 | be #@@@###
27 | be ###@@@
28 |
29 | bg @@####@@
30 | bg @####@@
31 |
32 | by ####@@#
33 |
34 | ch @@######
35 | ch [APM]######
36 |
37 | cy @@@###
38 |
39 | cz #@#####
40 | cz #@@####
41 |
42 | de @@@@####
43 | de @@@@###
44 | de @@@@##
45 | de @@@@#
46 | de @@@####
47 | de @@@###
48 | de @@@##
49 | de @@@#
50 | de @@@@####[HE]
51 | de @@@@###[HE]
52 | de @@@@##[HE]
53 | de @@@####[HE]
54 | de @@@###[HE]
55 | de @@@##[HE]
56 | de @@@#[HE]
57 |
58 | dk @@#####
59 |
60 | ee ###@@@
61 |
62 | es ####@@@
63 | es @####@@@
64 | es @####@@
65 | es @@####@@
66 |
67 | fi @@@###
68 |
69 | fr @@###@@
70 | fr ###@@@##
71 | fr ####@@##
72 |
73 | gb @@##@@@
74 |
75 | ge @@###@@
76 |
77 | gi [G]####@
78 |
79 | gr @@@####
80 |
81 | hr @@###@@
82 | hr @@####@@
83 | hr @@###@
84 | hr @@####@
85 |
86 | hu @@@###
87 |
88 | ie ##[12][CDGLTW]######
89 | ie ##[12][CDGKLMORSTW][DEHKLMNOSWXY]######
90 | ie ##[12][CDGLTW]#####
91 | ie ##[12][CDGKLMORSTW][DEHKLMNOSWXY]#####
92 | ie ##[12][CDGLTW]####
93 | ie ##[12][CDGKLMORSTW][DEHKLMNOSWXY]####
94 | ie ##[12][CDGLTW]###
95 | ie ##[12][CDGKLMORSTW][DEHKLMNOSWXY]###
96 | ie ##[CDGLTW]######
97 | ie ##[CDGKLMORSTW][DEHKLMNOSWXY]######
98 | ie ##[CDGLTW]#####
99 | ie ##[CDGKLMORSTW][DEHKLMNOSWXY]#####
100 | ie ##[CDGLTW]####
101 | ie ##[CDGKLMORSTW][DEHKLMNOSWXY]####
102 | ie ##[CDGLTW]###
103 | ie ##[CDGKLMORSTW][DEHKLMNOSWXY]###
104 |
105 | is @@@##
106 |
107 | it @@###@@
108 |
109 | kz ###@@@
110 |
111 | li @@#####
112 | li @@####
113 | li @@###
114 |
115 | lt @@@###
116 |
117 | lu @@####
118 |
119 | lv @@####
120 | lv @@###
121 | lv @####
122 | lv @###
123 |
124 | mc ????
125 |
126 | md @@@@###
127 | md [CK]@@###
128 | md @@@@##
129 | md [CK]@@##
130 | md @@@@#
131 | md [CK]@@#
132 |
133 | me @@@@###
134 |
135 | mk @@####@@
136 | mt @@@###
137 |
138 | nl @@####
139 | nl ####@@
140 | nl ##@@##
141 | nl @@##@@
142 | nl @@@@##
143 | nl ##@@@@
144 | nl ##@@@#
145 | nl #@@@##
146 | nl @@###@
147 | nl @###@@
148 | nl @@@##@
149 | nl @##@@@
150 | nl #@@###
151 | nl ###@@#
152 |
153 | no @@#####
154 | no #####
155 |
156 | pl @@#####
157 | pl @@####@
158 | pl @@###@@
159 | pl @@#@###
160 | pl @@#@@##
161 | pl @@@@###
162 | pl @@@##@@
163 | pl @@@#@##
164 | pl @@@##@#
165 | pl @@@#@@#
166 | pl @@@@@##
167 | pl @@@#####
168 | pl @@@####@
169 | pl @@@###@@
170 |
171 | pt @@####
172 | pt ####@@
173 | pt ##@@##
174 |
175 | ro @@##@@@
176 | ro [B]###@@@
177 | ro [B]##@@@
178 |
179 | rs @@###@@
180 |
181 | ru @###@@##
182 | ru @###@@###
183 |
184 | se @@@###
185 |
186 | si @@@@###
187 |
188 | sk @@###@@
189 |
190 | sm @####
191 | sm @###
192 |
193 | tr ##@####
194 | tr ##@#####
195 | tr ##@@###
196 | tr ##@@####
197 | tr ##@@@##
198 |
199 | ua @@####@@
200 |
201 | va [S][C][V]#####
202 | va [C][V]#####
203 |
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/postprocess/readme.txt:
--------------------------------------------------------------------------------
1 | Each line is a possible lp pattern organized by region/state and then likelihood.
2 |
3 | The parser goes through each line and tries to match
4 | @ = any letter
5 | # = any number
6 | ? = a skip position (can be anything, but remove it if encountered)
7 | [A-FGZ] is just a single char position with specific letter requirements. In this example, the regex defines characters ABCDEFGZ
8 |
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/postprocess/us.patterns:
--------------------------------------------------------------------------------
1 | base @@@####
2 | base @@@###
3 | base ###@@@
4 | al #@##@##
5 | al ##@##@#
6 | al @@#####
7 | al #####@@
8 | al #@####@
9 | al ##@###@
10 | al ##@#@#@
11 | ak @@@###
12 | as ####
13 | az @@@####
14 | az ?@@@####
15 | az ###@@@
16 | ar ###@@@
17 | ar @@@###
18 | ca #@@@###
19 | ca #@@@###
20 | ca #@#####
21 | ca #####@#
22 | ca ###@@@
23 | co ###@@@
24 | co @@####
25 | co @@@###
26 | co @@@####
27 | ct #@@@@#
28 | ct ###@@@
29 | ct #####
30 | ct ######
31 | ct @###
32 | ct @@###
33 | ct @@####
34 | de ######
35 | de #####
36 | de ####
37 | de ###
38 | dc @@####
39 | dc ######
40 | fl @@@@##
41 | fl ####[GH]@
42 | fl ###[H-Y]@@
43 | fl @###@@
44 | fl @##@@@
45 | fl @###@@
46 | fl @@@?@##
47 | fl ###?#[GH]@
48 | fl ###?[H-Y]@@
49 | fl @##?#@@
50 | fl @##?@@@
51 | fl @##?#@@
52 | ga @@@####
53 | ga ####@@@
54 | ga ####@@
55 | ga #####[Q]@
56 | ga ###@@@
57 | gu @@####
58 | gu @@@####
59 | gu @@@###@
60 | hi [A-HJKNMPR-Z]@@###
61 | id @######
62 | id #@#####
63 | id #@@####
64 | id #@@@###
65 | id [A]#####[T]
66 | id [A]@####[T]
67 | id #[A]####[T]
68 | id #[A]@###[T]
69 | id [BU]####
70 | id ####[BEFGHIJKLMNPRSTUXYZ]
71 | id ##[S][A][S]
72 | id #@@#[S]
73 | id [J]@###
74 | id #####[BCS]
75 | id ###@[E]
76 | id ##@@[E]
77 | id #####
78 | il @######
79 | il #####
80 | il ######
81 | il @@####
82 | il @@@###
83 | il @#####
84 | il #######
85 | il ####@
86 | il #####@
87 | in ###@
88 | in ###@@
89 | in ###@@@
90 | in ####
91 | ia @@@###
92 | ia ###@@@
93 | ia ####@@
94 | ks ###@@@
95 | ks @@@###
96 | ky ###@@@
97 | la @@@###
98 | me ####@@
99 | me ###@@
100 | me ##@@
101 | me ###@@@
102 | ms @@@@@#
103 | ms @@@###
104 | ms @@@?###
105 | ms ##[W]##
106 | md #@@@##
107 | md #[AB]####
108 | md @@@###
109 | md [A]######
110 | md #####
111 | md ###[AB][A-N][A-MY]
112 | md [AB][A-E][A-Y]##@
113 | md @#####
114 | ma ###@@#
115 | ma #@@###
116 | ma #@@@##
117 | ma ######
118 | ma ###@@@
119 | ma ####@@
120 | ma ##@@##
121 | mi @@@####
122 | mi #@@@##
123 | mn ###@@@
124 | mn @@@###
125 | mo @@#@#@
126 | mo ###@@@
127 | mo #@@##@
128 | mt ######[A]
129 | mt #####@
130 | mt ####@
131 | ne #@####
132 | ne #@@###
133 | ne ##@###
134 | ne ##@@##
135 | nv ###@@@
136 | nv @#####
137 | nv @@####
138 | nv @@@###
139 | nh ######
140 | nh #######
141 | nh @@@###
142 | nj @##@@@
143 | nj @@@##@
144 | nj @@###@
145 | nj @@@####
146 | nm @@@###
147 | nm ###@@@
148 | nm @@@###
149 | nm @@###
150 | nm @###
151 | ny @@@####
152 | ny @@@###
153 | ny #@@###
154 | ny @#@###
155 | ny @###@@
156 | ny @@###@
157 | nc @@@####
158 | nd @@@###
159 | mp @@@###
160 | oh @@@####
161 | oh @@##@@
162 | ok ###@@@
163 | or ###@@@
164 | or @@@###
165 | or ###?@@@
166 | or @@@?###
167 | pa @@@####
168 | pr @@@###
169 | ri @@###
170 | ri ######
171 | ri #####
172 | sc @@@###
173 | sc ####@@
174 | sd #@@###
175 | sd ##@###
176 | sd ##@@##
177 | sd ##@@@#
178 | tn ###@@@
179 | tx @@@####
180 | tx @##@@@
181 | tx ###@@@
182 | tx @@@###
183 | tx @@#@###
184 | ut @###@@
185 | ut @###@@
186 | ut ###@#
187 | ut ###@@@
188 | ut @@@###
189 | ut @##?#@@
190 | ut @##?#@@
191 | ut ###?@#
192 | ut ###?@@@
193 | ut @@@?###
194 | vt @@@###
195 | vt ###@###
196 | vt ##[B]##
197 | vi @@@###
198 | va @@@####
199 | va [J-Z]@@####
200 | va @@@###
201 | va @@####
202 | va ####@@
203 | va #####[JY]
204 | wa ###@@@
205 | wa @@@####
206 | wv [1-9DON]@@###
207 | wv [1-9DON]@####
208 | wy ######
209 | wy #######
210 | wy #####
211 | wy ####@
212 | wy ###@@
213 | wy ##@@@
214 |
--------------------------------------------------------------------------------
/app/src/main/assets/runtime_data/region/eu.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | BOOST
5 | LBP
6 | 13
7 | 52
8 |
9 | GAB
10 | 9.9500000476837158e-01
11 | 4.4999998807907104e-01
12 | 9.4999999999999996e-01
13 | 1
14 | 100
15 |
16 | 256
17 | 1
18 | 12
19 |
20 |
21 | <_>
22 | 4
23 | -1.8097745180130005e+00
24 |
25 | <_>
26 |
27 | 0 -1 40 805311953 -691727 2113524735 -2108461 -1078407169
28 | -4473889 -1146109953 -1074185492
29 |
30 | -8.3389264345169067e-01 6.6482132673263550e-01
31 | <_>
32 |
33 | 0 -1 14 -1624723464 -4443984 -64703235 -1216868228 -7684673
34 | -1070151 -1618019585 -1433916280
35 |
36 | -7.7608370780944824e-01 5.8700811862945557e-01
37 | <_>
38 |
39 | 0 -1 19 614727832 -1612616257 1745255677 -6475305
40 | -1366753605 -1079144802 1002113791 -1629746758
41 |
42 | -6.9801986217498779e-01 5.1161581277847290e-01
43 | <_>
44 |
45 | 0 -1 45 -2147269630 -2099757 -772579841 -547884401
46 | -609488921 -76826409 -371196929 -1039424890
47 |
48 | -6.3432163000106812e-01 4.9822175502777100e-01
49 |
50 | <_>
51 | 6
52 | -1.6889376640319824e+00
53 |
54 | <_>
55 |
56 | 0 -1 37 823136753 -2542607 1599577599 -2237985 -1147536901
57 | -71591686 -1148470273 -1075901777
58 |
59 | -7.8587698936462402e-01 5.9190028905868530e-01
60 | <_>
61 |
62 | 0 -1 22 1600978680 -33696264 -1084877327 -58928 -1146963009
63 | -5579557 -546776577 -1618474808
64 |
65 | -6.5951651334762573e-01 5.8263260126113892e-01
66 | <_>
67 |
68 | 0 -1 21 -462951934 13628047 -509885886 -352329529 -899942545
69 | 1078690347 -202390009 -512232577
70 |
71 | -6.3200807571411133e-01 5.2623480558395386e-01
72 | <_>
73 |
74 | 0 -1 51 487594460 -619080456 -1718052525 -1075865123
75 | -71540772 -76707172 -548220929 -128836
76 |
77 | -5.7273632287979126e-01 5.5056226253509521e-01
78 | <_>
79 |
80 | 0 -1 60 -479993342 -527044089 -626798585 1653596839
81 | 1110959381 575397931 -77506010 1937757023
82 |
83 | -6.4247721433639526e-01 5.0577211380004883e-01
84 | <_>
85 |
86 | 0 -1 46 268457040 -2138636 -6980099 -34121275 -1427580418
87 | -335560209 -1734673665 -1719069704
88 |
89 | -6.7786401510238647e-01 4.5851442217826843e-01
90 |
91 | <_>
92 | 5
93 | -1.3629199266433716e+00
94 |
95 | <_>
96 |
97 | 0 -1 78 -1270 -385885489 -1072442624 -101202993 -205784318
98 | 50579755 -223875328 -134217729
99 |
100 | -8.0022150278091431e-01 4.2767858505249023e-01
101 | <_>
102 |
103 | 0 -1 43 805852408 -1240592 -1178348033 1566527989
104 | -1188320001 -67132721 -1148604417 -1077994501
105 |
106 | -7.1916246414184570e-01 5.3092259168624878e-01
107 | <_>
108 |
109 | 0 -1 52 -2099542 279371931 570426146 25981188 -138186334
110 | 269492775 1459827403 2013265919
111 |
112 | -7.1977400779724121e-01 4.2900100350379944e-01
113 | <_>
114 |
115 | 0 -1 17 -538974994 148694470 -1944156952 -1982269969
116 | 1299832780 267128979 -74908676 -1025
117 |
118 | -6.0405021905899048e-01 5.2153891324996948e-01
119 | <_>
120 |
121 | 0 -1 39 928529624 -202827784 2018546933 -77671227
122 | -1633105201 -106405207 420279249 252182572
123 |
124 | -7.9407596588134766e-01 4.4149830937385559e-01
125 |
126 | <_>
127 | 6
128 | -1.6914845705032349e+00
129 |
130 | <_>
131 |
132 | 0 -1 74 -117447418 -203424957 -1333007190 -136315905
133 | -207628529 1527491074 -273419265 -469763089
134 |
135 | -7.6240599155426025e-01 4.2571428418159485e-01
136 | <_>
137 |
138 | 0 -1 10 -881930242 -1081718372 759341055 -1079899620
139 | -9704705 -10834632 -80831553 -1366686534
140 |
141 | -7.0847225189208984e-01 4.7101745009422302e-01
142 | <_>
143 |
144 | 0 -1 56 -65538 1059902300 1649449468 495195900 -1188287571
145 | 719866089 413712380 -17409
146 |
147 | -6.0372650623321533e-01 5.1609545946121216e-01
148 | <_>
149 |
150 | 0 -1 34 -1073486846 -545265809 -2101249 -134217745
151 | -276824065 -538968073 -704659973 -1072701149
152 |
153 | -5.2723455429077148e-01 5.9482514858245850e-01
154 | <_>
155 |
156 | 0 -1 59 -1744826288 -71879692 -1785233955 -323460
157 | -1164198417 -4576611 -1879442465 -1098374692
158 |
159 | -6.6947019100189209e-01 4.8889532685279846e-01
160 | <_>
161 |
162 | 0 -1 5 -420483410 -1594899217 -532159314 -932782337
163 | 1943533343 1696295075 -134559905 -34078725
164 |
165 | -6.8049335479736328e-01 4.5776519179344177e-01
166 |
167 | <_>
168 | 5
169 | -1.0514695644378662e+00
170 |
171 | <_>
172 |
173 | 0 -1 0 -1899833345 -1060353 -545816577 -2369025 -1953517569
174 | -4200225 -1412707329 -1884303875
175 |
176 | -7.1151864528656006e-01 4.1955834627151489e-01
177 | <_>
178 |
179 | 0 -1 26 470291672 1594456488 923230163 -2155043 -548005457
180 | -1156854119 -1148534817 -1074156579
181 |
182 | -6.6359061002731323e-01 4.6632391214370728e-01
183 | <_>
184 |
185 | 0 -1 73 -2098180 1406937524 18879260 1072970683 1604073656
186 | 386138325 2141787068 -1
187 |
188 | -6.0595369338989258e-01 4.8956662416458130e-01
189 | <_>
190 |
191 | 0 -1 48 -1065107456 -72363733 -83362849 -536886273
192 | -615521281 -73727349 -104368129 -1039669885
193 |
194 | -5.7387554645538330e-01 5.1478314399719238e-01
195 | <_>
196 |
197 | 0 -1 30 -804220688 -604380848 93818999 1903284625
198 | -1837057622 -105322486 1001658814 146809632
199 |
200 | -6.8071007728576660e-01 4.5826134085655212e-01
201 |
202 | <_>
203 | 7
204 | -1.2851260900497437e+00
205 |
206 | <_>
207 |
208 | 0 -1 76 -469762302 -406855813 -900735066 -754977809
209 | -480248062 1467738447 -947127609 -738198529
210 |
211 | -7.7277177572250366e-01 1.8757019937038422e-01
212 | <_>
213 |
214 | 0 -1 41 -1879043887 -697865 -8921089 -2661417 -1141637121
215 | -6917 -1080640513 -1077996323
216 |
217 | -6.5664166212081909e-01 4.0080460906028748e-01
218 | <_>
219 |
220 | 0 -1 54 523766968 1071455224 930560885 -2098947 2106400509
221 | -1078052162 1591720959 -1075896931
222 |
223 | -6.1509358882904053e-01 4.2310744524002075e-01
224 | <_>
225 |
226 | 0 -1 64 -8651778 -4277508 799804080 1006344958 -14402568
227 | 410268661 2147327960 -1
228 |
229 | -4.9080836772918701e-01 5.2360612154006958e-01
230 | <_>
231 |
232 | 0 -1 24 1088939042 1810221070 -279576713 -404492753
233 | 1618469823 718008371 -149431041 1614276131
234 |
235 | -6.7838019132614136e-01 3.8422819972038269e-01
236 | <_>
237 |
238 | 0 -1 58 -1073494493 -2129 -134254593 -134219777 -134217793
239 | -1 -306473026 -1018443994
240 |
241 | -4.2494711279869080e-01 5.7714998722076416e-01
242 | <_>
243 |
244 | 0 -1 33 -5221000 -1114344044 -1099382275 -319523 1782890237
245 | -17110082 1000266751 -1909977844
246 |
247 | -6.6518503427505493e-01 3.9107745885848999e-01
248 |
249 | <_>
250 | 7
251 | -1.3347427845001221e+00
252 |
253 | <_>
254 |
255 | 0 -1 35 -1064835289 -262657 -304612481 -10753 -68160513
256 | -72365105 -337910785 -509876305
257 |
258 | -6.8524187803268433e-01 3.7823274731636047e-01
259 | <_>
260 |
261 | 0 -1 6 -285278470 550824651 -1094793490 -1427444482
262 | -12229897 1936169977 -270537745 -1281
263 |
264 | -6.9259029626846313e-01 3.6514124274253845e-01
265 | <_>
266 |
267 | 0 -1 50 -2 1072971740 1469594812 2147236670 1072445948
268 | 1071398300 258306045 2138439679
269 |
270 | -6.4422893524169922e-01 3.5341870784759521e-01
271 | <_>
272 |
273 | 0 -1 77 -1065714 254791671 -731382782 -2101936449 1842282242
274 | 2013256162 1924135744 -469762069
275 |
276 | -6.3399165868759155e-01 3.5231015086174011e-01
277 | <_>
278 |
279 | 0 -1 12 -561580302 -605386104 -1675307299 -35200410
280 | -1192691478 -7641158 -581569329 -1369166102
281 |
282 | -5.7274460792541504e-01 4.2036578059196472e-01
283 | <_>
284 |
285 | 0 -1 55 -2138864126 -4201985 -642265613 -210241921 -19989761
286 | -3952177 -141558833 -2095331545
287 |
288 | -5.2967888116836548e-01 4.3784245848655701e-01
289 | <_>
290 |
291 | 0 -1 8 -830297412 -7802014 1277567223 1068347800 2064507871
292 | -69260897 -70362181 -1083442246
293 |
294 | -5.0855410099029541e-01 4.3978407979011536e-01
295 |
296 | <_>
297 | 7
298 | -1.1835207939147949e+00
299 |
300 | <_>
301 |
302 | 0 -1 62 -1025 -4396129 1971420605 2147480543 -72745987
303 | 999057909 998865912 -1
304 |
305 | -6.2991225719451904e-01 4.2762723565101624e-01
306 | <_>
307 |
308 | 0 -1 11 -1499277837 -1056769 -575146113 -3147017 -1906574593
309 | -4199525 -1409286145 -1360048899
310 |
311 | -5.1901364326477051e-01 4.7817090153694153e-01
312 | <_>
313 |
314 | 0 -1 65 -1 1069088700 -42160132 2147384700 -216067 183271421
315 | 1070607356 -1
316 |
317 | -3.9919072389602661e-01 5.6214183568954468e-01
318 | <_>
319 |
320 | 0 -1 7 -357904642 231662471 10134269 1534886015 1336724732
321 | 1600028668 939520767 -805610049
322 |
323 | -5.3103089332580566e-01 4.1148453950881958e-01
324 | <_>
325 |
326 | 0 -1 27 1078457858 -137102849 -1002967209 -671383873
327 | 1475047263 1759237042 2053111259 1079494146
328 |
329 | -6.8956327438354492e-01 3.1366679072380066e-01
330 | <_>
331 |
332 | 0 -1 69 1543485614 532452284 465371692 1071593917 805052841
333 | 114115064 801844479 2145353727
334 |
335 | -6.5592241287231445e-01 3.1573730707168579e-01
336 | <_>
337 |
338 | 0 -1 70 -1621418188 -12621959 -1156064295 -1619035693
339 | -1147405636 -72399880 264178616 162469136
340 |
341 | -6.0899454355239868e-01 3.2693719863891602e-01
342 |
343 | <_>
344 | 8
345 | -1.3792396783828735e+00
346 |
347 | <_>
348 |
349 | 0 -1 63 -896547289 -69206021 -113517697 -1052225 -68420609
350 | -67116645 -262145 -746600513
351 |
352 | -6.4787888526916504e-01 3.4486734867095947e-01
353 | <_>
354 |
355 | 0 -1 16 682098471 16776910 -37761185 -67637249 -10748929
356 | -224138833 -11537429 -356519169
357 |
358 | -5.3469586372375488e-01 4.4898313283920288e-01
359 | <_>
360 |
361 | 0 -1 80 -2097156 -550503779 -136588804 -1507362 -71830028
362 | 356891563 -3596 -33554441
363 |
364 | -4.7742679715156555e-01 4.9222531914710999e-01
365 | <_>
366 |
367 | 0 -1 31 -9447425 -18531 1463749625 1467983669 -1619632146
368 | -1088585865 1599745195 2066940426
369 |
370 | -4.2506697773933411e-01 5.0970840454101562e-01
371 | <_>
372 |
373 | 0 -1 9 -554774785 469641207 -1631651073 1064967857
374 | -689152273 -591873 -71685 -10289665
375 |
376 | -3.9916789531707764e-01 5.2942800521850586e-01
377 | <_>
378 |
379 | 0 -1 32 -460868 -1149758532 -1955583982 999878622 995457144
380 | 100663605 769463536 1609564143
381 |
382 | -6.4832550287246704e-01 3.3265480399131775e-01
383 | <_>
384 |
385 | 0 -1 61 -525614592 -73410230 -1055140389 1397186271
386 | 1796729711 -81276894 -10489481 1393553927
387 |
388 | -5.8127319812774658e-01 3.2805305719375610e-01
389 | <_>
390 |
391 | 0 -1 71 -69206083 2140951352 1605407413 1073482444
392 | -1166230804 984105561 265051901 -4202499
393 |
394 | -4.3958845734596252e-01 4.4159027934074402e-01
395 |
396 | <_>
397 | 9
398 | -1.6337682008743286e+00
399 |
400 | <_>
401 |
402 | 0 -1 49 -1 -254281737 -847263745 -704649317 -547359277
403 | -214437129 -137368609 -1025
404 |
405 | -5.8612054586410522e-01 5.3436428308486938e-01
406 | <_>
407 |
408 | 0 -1 3 -1964573706 -2163202 -629999617 1724277282
409 | -1345454081 -54273 -1947226113 -134494477
410 |
411 | -5.9594768285751343e-01 3.4550479054450989e-01
412 | <_>
413 |
414 | 0 -1 25 -33624106 1979243351 -1684228388 -1327580354
415 | 1869634120 1507656105 1004215260 -65537
416 |
417 | -5.5408185720443726e-01 3.4455263614654541e-01
418 | <_>
419 |
420 | 0 -1 20 216 -273853464 -1746981891 2147439095 -1342177362
421 | -1882457730 535869183 -1892939286
422 |
423 | -6.8447190523147583e-01 2.6072457432746887e-01
424 | <_>
425 |
426 | 0 -1 79 -9470 -881859202 -472124544 1722743726 2040260640
427 | 88788209 -311968000 -420088102
428 |
429 | -5.8676868677139282e-01 3.3556821942329407e-01
430 | <_>
431 |
432 | 0 -1 47 2147466972 2069665750 405150428 1073037215 721199016
433 | 465318864 1859398396 2139054079
434 |
435 | -6.0411739349365234e-01 2.8773531317710876e-01
436 | <_>
437 |
438 | 0 -1 44 -1073955720 2142794040 2033980733 -1107354732
439 | -1141629188 -5309192 -340984065 796396953
440 |
441 | -7.0512706041336060e-01 2.0565895736217499e-01
442 | <_>
443 |
444 | 0 -1 1 -285218257 641662811 -317140617 -1615220229
445 | 1397455865 1830527419 -480512675 1879048055
446 |
447 | -4.5888698101043701e-01 3.7875139713287354e-01
448 | <_>
449 |
450 | 0 -1 67 -136335093 1363122398 -1475206391 2001653675
451 | -275119445 1368433380 831138571 2132278783
452 |
453 | -4.4568619132041931e-01 3.9391869306564331e-01
454 |
455 | <_>
456 | 9
457 | -1.6722478866577148e+00
458 |
459 | <_>
460 |
461 | 0 -1 13 -2097665 285007871 -14702337 -1073745441 -603979783
462 | -12805 -7606276 -33
463 |
464 | -6.4239740371704102e-01 3.0229949951171875e-01
465 | <_>
466 |
467 | 0 -1 68 -1297 -605028505 1663525735 -4983053 -1132728133
468 | -326122023 -1512309265 -1049601
469 |
470 | -3.4561732411384583e-01 6.5836638212203979e-01
471 | <_>
472 |
473 | 0 -1 28 -1879027627 -11273 -38282337 -69730305 -1192231939
474 | -263686 -1109656581 -1142203922
475 |
476 | -4.3300274014472961e-01 4.2989093065261841e-01
477 | <_>
478 |
479 | 0 -1 75 -50337789 2147446389 -16778341 1374150655 -134224126
480 | 2013265911 -285214754 -202385409
481 |
482 | -3.8676849007606506e-01 4.9856430292129517e-01
483 | <_>
484 |
485 | 0 -1 18 120097976 1060086728 -1389487875 -1137790177
486 | 1602117610 -1619061910 -35668997 -1343251714
487 |
488 | -5.7169276475906372e-01 3.2476642727851868e-01
489 | <_>
490 |
491 | 0 -1 57 -293082161 1154481003 1111976386 1447558455
492 | 1677190926 69697407 1417113986 -1553
493 |
494 | -4.1726982593536377e-01 4.2075014114379883e-01
495 | <_>
496 |
497 | 0 -1 29 -1313845040 -4467728 1134850749 -175787547
498 | -1194534214 -878738628 1573022699 883187712
499 |
500 | -6.9330018758773804e-01 2.6707106828689575e-01
501 | <_>
502 |
503 | 0 -1 38 -78190598 -19340938 -1491289896 1809372080 524079264
504 | 491799709 1996433399 -16778277
505 |
506 | -4.9384438991546631e-01 3.3502304553985596e-01
507 | <_>
508 |
509 | 0 -1 2 -1562189238 -691542934 -1197225897 -421099968
510 | 198047231 -273967949 954460927 -161480843
511 |
512 | -5.9740668535232544e-01 2.6929464936256409e-01
513 |
514 | <_>
515 | 9
516 | -1.4638713598251343e+00
517 |
518 | <_>
519 |
520 | 0 -1 53 -1 -4262913 2134212095 2145352703 -1058817 993552889
521 | 1055702527 -1
522 |
523 | -5.8213829994201660e-01 4.4301766157150269e-01
524 | <_>
525 |
526 | 0 -1 23 -528260318 -75500601 -579380737 -2099850 -1063233
527 | -72614673 -69469185 -948439049
528 |
529 | -4.8428696393966675e-01 3.6954393982887268e-01
530 | <_>
531 |
532 | 0 -1 72 -62975984 -109063308 -220856875 -212370443
533 | -1694834769 -4560166 872043843 -1157812201
534 |
535 | -4.9901553988456726e-01 3.3146089315414429e-01
536 | <_>
537 |
538 | 0 -1 42 497556920 532413304 -1102144617 501201365 1535916763
539 | 1594493624 2142156779 1876574201
540 |
541 | -6.4244377613067627e-01 2.4512745440006256e-01
542 | <_>
543 |
544 | 0 -1 4 1120136910 -521672978 111862860 -806363025 -516557833
545 | -670045001 1709173499 -67114049
546 |
547 | -5.2952063083648682e-01 3.0346292257308960e-01
548 | <_>
549 |
550 | 0 -1 36 -997733374 -206319209 -415124517 -406932517
551 | -746852645 -7087441 -395582722 1111744578
552 |
553 | -5.4006469249725342e-01 3.0697867274284363e-01
554 | <_>
555 |
556 | 0 -1 15 -720467974 -541134070 -1319464207 -1162493988
557 | -922194945 -1146112565 -741476891 -1349606460
558 |
559 | -5.7269197702407837e-01 2.6673358678817749e-01
560 | <_>
561 |
562 | 0 -1 81 -100667637 657118705 -1242872032 2016867655
563 | -541072749 63672337 -136122523 -182452739
564 |
565 | -4.3601182103157043e-01 3.6583909392356873e-01
566 | <_>
567 |
568 | 0 -1 66 -938523136 -69889 -1720331847 -2371401 -347348081
569 | -81010021 -646974889 56092062
570 |
571 | -5.2380156517028809e-01 2.9095169901847839e-01
572 |
573 | <_>
574 |
575 | 0 0 4 1
576 | <_>
577 |
578 | 0 1 2 3
579 | <_>
580 |
581 | 0 1 5 2
582 | <_>
583 |
584 | 0 1 6 1
585 | <_>
586 |
587 | 0 3 10 1
588 | <_>
589 |
590 | 0 5 3 2
591 | <_>
592 |
593 | 0 6 2 2
594 | <_>
595 |
596 | 0 9 5 1
597 | <_>
598 |
599 | 0 9 11 1
600 | <_>
601 |
602 | 0 10 4 1
603 | <_>
604 |
605 | 0 10 8 1
606 | <_>
607 |
608 | 1 0 3 1
609 | <_>
610 |
611 | 1 1 14 1
612 | <_>
613 |
614 | 1 4 2 3
615 | <_>
616 |
617 | 2 10 11 1
618 | <_>
619 |
620 | 2 10 14 1
621 | <_>
622 |
623 | 3 1 1 2
624 | <_>
625 |
626 | 3 4 2 3
627 | <_>
628 |
629 | 3 9 12 1
630 | <_>
631 |
632 | 4 0 8 1
633 | <_>
634 |
635 | 4 0 13 1
636 | <_>
637 |
638 | 4 2 1 2
639 | <_>
640 |
641 | 4 10 13 1
642 | <_>
643 |
644 | 5 0 1 2
645 | <_>
646 |
647 | 5 0 2 3
648 | <_>
649 |
650 | 5 7 1 2
651 | <_>
652 |
653 | 7 9 13 1
654 | <_>
655 |
656 | 10 0 2 3
657 | <_>
658 |
659 | 10 0 3 1
660 | <_>
661 |
662 | 10 1 8 1
663 | <_>
664 |
665 | 10 1 13 1
666 | <_>
667 |
668 | 10 2 12 1
669 | <_>
670 |
671 | 11 4 1 3
672 | <_>
673 |
674 | 11 10 5 1
675 | <_>
676 |
677 | 12 0 1 2
678 | <_>
679 |
680 | 13 0 1 2
681 | <_>
682 |
683 | 13 0 1 3
684 | <_>
685 |
686 | 13 0 9 1
687 | <_>
688 |
689 | 14 4 2 3
690 | <_>
691 |
692 | 15 10 10 1
693 | <_>
694 |
695 | 16 0 7 1
696 | <_>
697 |
698 | 17 0 4 1
699 | <_>
700 |
701 | 18 9 8 1
702 | <_>
703 |
704 | 19 0 8 1
705 | <_>
706 |
707 | 19 10 4 1
708 | <_>
709 |
710 | 20 0 1 2
711 | <_>
712 |
713 | 20 0 4 1
714 | <_>
715 |
716 | 20 7 2 2
717 | <_>
718 |
719 | 21 0 1 2
720 | <_>
721 |
722 | 21 4 2 2
723 | <_>
724 |
725 | 21 7 2 2
726 | <_>
727 |
728 | 21 9 7 1
729 | <_>
730 |
731 | 22 3 2 3
732 | <_>
733 |
734 | 24 7 1 2
735 | <_>
736 |
737 | 24 9 8 1
738 | <_>
739 |
740 | 25 0 1 2
741 | <_>
742 |
743 | 25 7 1 2
744 | <_>
745 |
746 | 26 3 2 1
747 | <_>
748 |
749 | 27 0 1 2
750 | <_>
751 |
752 | 27 0 6 1
753 | <_>
754 |
755 | 27 1 1 3
756 | <_>
757 |
758 | 28 0 1 3
759 | <_>
760 |
761 | 28 7 1 2
762 | <_>
763 |
764 | 30 0 1 2
765 | <_>
766 |
767 | 30 4 2 3
768 | <_>
769 |
770 | 30 7 1 2
771 | <_>
772 |
773 | 31 0 1 2
774 | <_>
775 |
776 | 31 3 3 3
777 | <_>
778 |
779 | 33 3 4 2
780 | <_>
781 |
782 | 34 6 3 2
783 | <_>
784 |
785 | 34 10 6 1
786 | <_>
787 |
788 | 35 7 1 2
789 | <_>
790 |
791 | 37 0 5 1
792 | <_>
793 |
794 | 37 4 2 3
795 | <_>
796 |
797 | 49 0 1 2
798 | <_>
799 |
800 | 49 1 1 1
801 | <_>
802 |
803 | 49 1 1 2
804 | <_>
805 |
806 | 49 2 1 1
807 | <_>
808 |
809 | 49 3 1 2
810 | <_>
811 |
812 | 49 4 1 2
813 | <_>
814 |
815 | 49 4 1 3
816 | <_>
817 |
818 | 49 8 1 1
819 |
820 |
--------------------------------------------------------------------------------
/app/src/main/java/org/openalpr/AlprJNIWrapper.java:
--------------------------------------------------------------------------------
1 | package org.openalpr;
2 |
3 | /**
4 | * Open ALPR wrapper.
5 | */
6 | public class AlprJNIWrapper implements OpenALPR {
7 |
8 | static {
9 | System.loadLibrary("openalpr-native");
10 | }
11 |
12 | /* (non-Javadoc)
13 | * @see org.openalpr.Alpr#recognize(java.lang.String, int)
14 | */
15 | @Override
16 | public native String recognize(String imgFilePath, int topN);
17 |
18 | /* (non-Javadoc)
19 | * @see org.openalpr.Alpr#recognizeWithCountryNRegion(java.lang.String, java.lang.String, java.lang.String, int)
20 | */
21 | @Override
22 | public native String recognizeWithCountryNRegion(String country, String region,
23 | String imgFilePath, int topN);
24 |
25 | /* (non-Javadoc)
26 | * @see org.openalpr.Alpr#recognizeWithCountryRegionNConfig(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int)
27 | */
28 | @Override
29 | public native String recognizeWithCountryRegionNConfig(String country,
30 | String region, String imgFilePath, String configFilePath, int topN);
31 |
32 | /*
33 | * (non-Javadoc)
34 | * @see org.openalpr.Alpr#version()
35 | */
36 | @Override
37 | public native String version();
38 | }
--------------------------------------------------------------------------------
/app/src/main/java/org/openalpr/OpenALPR.java:
--------------------------------------------------------------------------------
1 | package org.openalpr;
2 |
3 | import android.content.Context;
4 |
5 | import org.openalpr.util.Utils;
6 |
7 | import java.io.File;
8 |
9 | /**
10 | * Automatic License Plate Recognition library http://www.openalpr.com
11 | *
12 | * Android version.
13 | */
14 | public interface OpenALPR {
15 |
16 | /**
17 | * Recognizes the licence plate.
18 | *
19 | * @param imgFilePath - Image containing the license plate
20 | * @param topN - Max number of possible plate numbers to return(default 10)
21 | *
22 | * @return - JSON string of results
23 | */
24 | String recognize(String imgFilePath, int topN);
25 |
26 | /**
27 | * Recognizes the licence plate.
28 | *
29 | * @param country - Country code to identify (either us for USA or eu for Europe).
30 | * Default=us
31 | * @param region - Attempt to match the plate number against a region template (e.g., md
32 | * for Maryland, ca for California)
33 | * @param imgFilePath - Image containing the license plate
34 | * @param topN - Max number of possible plate numbers to return(default 10)
35 | *
36 | * @return - JSON string of results
37 | */
38 | String recognizeWithCountryNRegion(String country, String region, String imgFilePath, int topN);
39 |
40 | /**
41 | * Recognizes the licence plate.
42 | *
43 | * @param country - Country code to identify (either us for USA or eu for Europe).
44 | * Default=us
45 | * @param region - Attempt to match the plate number against a region template (e.g., md
46 | * for Maryland, ca for California)
47 | * @param imgFilePath - Image containing the license plate
48 | * @param configFilePath - Config file path (default /etc/openalpr/openalpr.conf)
49 | * @param topN - Max number of possible plate numbers to return(default 10)
50 | *
51 | * @return - JSON string of results
52 | */
53 | String recognizeWithCountryRegionNConfig(String country, String region, String configFilePath, String imgFilePath, int topN);
54 |
55 | /**
56 | * Returns the Open ALPR version.
57 | *
58 | * @return - Version string
59 | */
60 | String version();
61 |
62 | /**
63 | * OpenALPR factory.
64 | */
65 | class Factory {
66 |
67 | private Factory() {}
68 |
69 | static OpenALPR instance;
70 |
71 | /**
72 | *
73 | * @param context The application context.
74 | * @param androidDataDir The application data directory. Something like: "/data/data/com.sandro.openalprsample".
75 | *
76 | * @return returns the OpenALPR instance.
77 | */
78 | public synchronized static OpenALPR create(Context context, String androidDataDir) {
79 | if (instance == null) {
80 | instance = new AlprJNIWrapper();
81 |
82 | Utils.copyAssetFolder(context.getAssets(), "runtime_data", androidDataDir + File.separatorChar + "runtime_data");
83 | }
84 |
85 | return instance;
86 | }
87 | }
88 |
89 | }
90 |
--------------------------------------------------------------------------------
/app/src/main/java/org/openalpr/model/Candidate.java:
--------------------------------------------------------------------------------
1 | package org.openalpr.model;
2 |
3 | /**
4 | * Candidate model.
5 | */
6 | public class Candidate {
7 |
8 | private final String plate;
9 |
10 | private final Double confidence;
11 |
12 | private final Integer matches_template;
13 |
14 | public Candidate(String plate, Double confidence, Integer matches_template) {
15 | this.plate = plate;
16 | this.confidence = confidence;
17 | this.matches_template = matches_template;
18 | }
19 |
20 | /**
21 | * Gets the plate.
22 | *
23 | * @return The plate.
24 | */
25 | public String getPlate() {
26 | return plate;
27 | }
28 |
29 | /**
30 | * Gets the confidence level.
31 | *
32 | * @return the confidence level.
33 | */
34 | public Double getConfidence() {
35 | return confidence;
36 | }
37 |
38 | /**
39 | * Gets the matches template.
40 | *
41 | * @return the matches template.
42 | */
43 | public Integer getMatchesTemplate() {
44 | return matches_template;
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/org/openalpr/model/Coordinate.java:
--------------------------------------------------------------------------------
1 | package org.openalpr.model;
2 |
3 | /**
4 | * Coordinate model.
5 | */
6 | public class Coordinate {
7 |
8 | private final Integer x;
9 |
10 | private final Integer y;
11 |
12 | public Coordinate(Integer x, Integer y) {
13 | this.x = x;
14 | this.y = y;
15 | }
16 |
17 | /**
18 | * Gets the X coordinate.
19 | *
20 | * @return The X coordinate.
21 | */
22 | public Integer getX() {
23 | return x;
24 | }
25 |
26 | /**
27 | * Gets the Y coordinate.
28 | *
29 | * @return the Y coordinate.
30 | */
31 | public Integer getY() {
32 | return y;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/org/openalpr/model/Result.java:
--------------------------------------------------------------------------------
1 | package org.openalpr.model;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * Result model.
7 | */
8 | public class Result {
9 |
10 | private final String plate;
11 |
12 | private final Double confidence;
13 |
14 | private final Double matches_template;
15 |
16 | private final String region;
17 |
18 | private final Double region_confidence;
19 |
20 | private final Double processing_time_ms;
21 |
22 | private final List coordinates;
23 |
24 | private final List candidates;
25 |
26 | public Result(String plate, Double confidence, Double matches_template, String region, Double region_confidence, Double processing_time_ms, List coordinates, List candidates) {
27 | this.plate = plate;
28 | this.confidence = confidence;
29 | this.matches_template = matches_template;
30 | this.region = region;
31 | this.region_confidence = region_confidence;
32 | this.processing_time_ms = processing_time_ms;
33 | this.coordinates = coordinates;
34 | this.candidates = candidates;
35 | }
36 |
37 | /**
38 | * Gets the plate.
39 | *
40 | * @return the plate.
41 | */
42 | public String getPlate() {
43 | return plate;
44 | }
45 |
46 | /**
47 | * Gets the confidence.
48 | *
49 | * @return The confidence.
50 | */
51 | public Double getConfidence() {
52 | return confidence;
53 | }
54 |
55 | /**
56 | * Gets the matches template.
57 | *
58 | * @return The matches template.
59 | */
60 | public Double getMatchesTemplate() {
61 | return matches_template;
62 | }
63 |
64 | /**
65 | * Gets the region.
66 | *
67 | * @return The region.
68 | */
69 | public String getRegion() {
70 | return region;
71 | }
72 |
73 | /**
74 | * Gets the region confidence.
75 | *
76 | * @return the region confidence.
77 | */
78 | public Double getRegionConfidence() {
79 | return region_confidence;
80 | }
81 |
82 | /**
83 | * Gets the processing time.
84 | *
85 | * @return The processing time.
86 | */
87 | public Double getProcessingTimeMs() {
88 | return processing_time_ms;
89 | }
90 |
91 | /**
92 | * Gets the coordinates.
93 | *
94 | * @return The coordinates.
95 | */
96 | public List getCoordinates() {
97 | return coordinates;
98 | }
99 |
100 | /**
101 | * Gets the candidates.
102 | *
103 | * @return The candidates.
104 | */
105 | public List getCandidates() {
106 | return candidates;
107 | }
108 |
109 | }
110 |
--------------------------------------------------------------------------------
/app/src/main/java/org/openalpr/model/Results.java:
--------------------------------------------------------------------------------
1 | package org.openalpr.model;
2 |
3 | import java.util.List;
4 |
5 | public class Results {
6 |
7 | private final Double epoch_time;
8 |
9 | private final Double processing_time_ms;
10 |
11 | private final List results;
12 |
13 | public Results(Double epoch_time, Double processing_time_ms, List results) {
14 | this.epoch_time = epoch_time;
15 | this.processing_time_ms = processing_time_ms;
16 | this.results = results;
17 | }
18 |
19 | public Double getEpochTime() {
20 | return epoch_time;
21 | }
22 |
23 | public Double getProcessingTimeMs() {
24 | return processing_time_ms;
25 | }
26 |
27 | public List getResults() {
28 | return results;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/java/org/openalpr/model/ResultsError.java:
--------------------------------------------------------------------------------
1 | package org.openalpr.model;
2 |
3 | /**
4 | * ResultsError model.
5 | */
6 | public class ResultsError {
7 |
8 | private final Boolean error;
9 |
10 | private final String msg;
11 |
12 | public ResultsError(Boolean error, String msg) {
13 | this.error = error;
14 | this.msg = msg;
15 | }
16 |
17 | /**
18 | * Gets the error.
19 | *
20 | * @return the error.
21 | */
22 | public Boolean getError() {
23 | return error;
24 | }
25 |
26 | /**
27 | * Gets the message.
28 | *
29 | * @return the message.
30 | */
31 | public String getMsg() {
32 | return msg;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/org/openalpr/util/Utils.java:
--------------------------------------------------------------------------------
1 | package org.openalpr.util;
2 |
3 | import android.content.res.AssetManager;
4 |
5 | import java.io.File;
6 | import java.io.FileOutputStream;
7 | import java.io.IOException;
8 | import java.io.InputStream;
9 | import java.io.OutputStream;
10 |
11 | /**
12 | * OpenALPR utils.
13 | */
14 | public class Utils {
15 |
16 | private Utils() {}
17 |
18 | /**
19 | * Copies the assets folder.
20 | *
21 | * @param assetManager The assets manager.
22 | * @param fromAssetPath The from assets path.
23 | * @param toPath The to assets path.
24 | *
25 | * @return A boolean indicating if the process went as expected.
26 | */
27 | public static boolean copyAssetFolder(AssetManager assetManager, String fromAssetPath, String toPath) {
28 | try {
29 | String[] files = assetManager.list(fromAssetPath);
30 |
31 | new File(toPath).mkdirs();
32 |
33 | boolean res = true;
34 |
35 | for (String file : files)
36 |
37 | if (file.contains(".")) {
38 | res &= copyAsset(assetManager, fromAssetPath + "/" + file, toPath + "/" + file);
39 | } else {
40 | res &= copyAssetFolder(assetManager, fromAssetPath + "/" + file, toPath + "/" + file);
41 | }
42 |
43 | return res;
44 | } catch (Exception e) {
45 | e.printStackTrace();
46 |
47 | return false;
48 | }
49 | }
50 |
51 | /**
52 | * Copies an asset to the application folder.
53 | *
54 | * @param assetManager The asset manager.
55 | * @param fromAssetPath The from assets path.
56 | * @param toPath The to assests path.
57 | *
58 | * @return A boolean indicating if the process went as expected.
59 | */
60 | private static boolean copyAsset(AssetManager assetManager, String fromAssetPath, String toPath) {
61 | InputStream in = null;
62 | OutputStream out = null;
63 |
64 | try {
65 | in = assetManager.open(fromAssetPath);
66 |
67 | new File(toPath).createNewFile();
68 |
69 | out = new FileOutputStream(toPath);
70 |
71 | copyFile(in, out);
72 | in.close();
73 |
74 | in = null;
75 |
76 | out.flush();
77 | out.close();
78 |
79 | out = null;
80 |
81 | return true;
82 | } catch (Exception e) {
83 | e.printStackTrace();
84 | return false;
85 | }
86 | }
87 |
88 | /**
89 | * Copies a file.
90 | *
91 | * @param in The input stream.
92 | * @param out The output stream.
93 | *
94 | * @throws IOException
95 | */
96 | private static void copyFile(InputStream in, OutputStream out) throws IOException {
97 | byte[] buffer = new byte[1024];
98 |
99 | int read;
100 |
101 | while ((read = in.read(buffer)) != -1) {
102 | out.write(buffer, 0, read);
103 | }
104 | }
105 |
106 | }
107 |
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/liblept.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/jniLibs/armeabi-v7a/liblept.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libopenalpr-native.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/jniLibs/armeabi-v7a/libopenalpr-native.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libopencv_java.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/jniLibs/armeabi-v7a/libopencv_java.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libtess.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/app/src/main/jniLibs/armeabi-v7a/libtess.so
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.5.0'
9 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
10 |
11 | // NOTE: Do not place your application dependencies here; they belong
12 | // in the individual module build.gradle files
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | jcenter()
19 | }
20 | }
21 |
22 | task clean(type: Delete) {
23 | delete rootProject.buildDir
24 | }
25 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Dec 13 20:39:31 WET 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/images/screencast.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/images/screencast.gif
--------------------------------------------------------------------------------
/images/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SandroMachado/openalpr-android/793b1362753a0dd5c32d26a1ebfb6b8102a82749/images/screenshot.png
--------------------------------------------------------------------------------
/openalpr.conf:
--------------------------------------------------------------------------------
1 | [common]
2 |
3 | ; Specify the path to the runtime data directory, bellow you can see how it is configured to the sample application
4 | runtime_dir = /data/data/com.sandro.openalprsample/runtime_data
5 |
6 |
7 | ocr_img_size_percent = 1.33333333
8 | state_id_img_size_percent = 2.0
9 |
10 | ; detection will ignore plates that are too large. This is a good efficiency technique to use if the
11 | ; plates are going to be a fixed distance away from the camera (e.g., you will never see plates that fill
12 | ; up the entire image
13 | max_plate_width_percent = 100
14 | max_plate_height_percent = 100
15 |
16 | ; detection_iteration_increase is the percentage that the LBP frame increases each iteration.
17 | ; It must be greater than 1.0. A value of 1.01 means increase by 1%, 1.10 increases it by 10% each time.
18 | ; So a 1% increase would be ~10x slower than 10% to process, but it has a higher chance of landing
19 | ; directly on the plate and getting a strong detection
20 | detection_iteration_increase = 1.1
21 |
22 | ; The minimum detection strength determines how sure the detection algorithm must be before signaling that
23 | ; a plate region exists. Technically this corresponds to LBP nearest neighbors (e.g., how many detections
24 | ; are clustered around the same area). For example, 2 = very lenient, 9 = very strict.
25 | detection_strictness = 3
26 |
27 | ; The detection doesn't necessarily need an extremely high resolution image in order to detect plates
28 | ; Using a smaller input image should still find the plates and will do it faster
29 | ; Tweaking the max_detection_input values will resize the input image if it is larger than these sizes
30 | ; max_detection_input_width/height are specified in pixels
31 | max_detection_input_width = 1280
32 | max_detection_input_height = 720
33 |
34 | opencl_enabled = 0
35 | multithreading_cores = 1
36 |
37 |
38 |
39 | max_plate_angle_degrees = 15
40 |
41 | ocr_min_font_point = 6
42 |
43 | ; Minimum OCR confidence percent to consider.
44 | postprocess_min_confidence = 65
45 |
46 | ; Any OCR character lower than this will also add an equally likely
47 | ; chance that the character is incorrect and will be skipped. Value is a confidence percent
48 | postprocess_confidence_skip_level = 80
49 |
50 | ; Reduces the total permutations to consider for scoring.
51 | postprocess_max_substitutions = 2
52 |
53 | ; Results with fewer characters will be discarded
54 | postprocess_min_characters = 4
55 | postprocess_max_characters = 8
56 |
57 | [debug]
58 | general = 0
59 | timing = 0
60 | state_id = 0
61 | plate_lines = 0
62 | plate_corners = 0
63 | char_regions = 0
64 | char_segment = 0
65 | char_analysis = 0
66 | color_filter = 0
67 | ocr = 0
68 | postprocess = 0
69 | show_images = 0
70 | pause_on_frame = 0
71 |
72 | ;;; Country Specific variables ;;;;
73 |
74 | [us]
75 |
76 | ; 30-50, 40-60, 50-70, 60-80
77 | char_analysis_min_pct = 0.30
78 | char_analysis_height_range = 0.20
79 | char_analysis_height_step_size = 0.10
80 | char_analysis_height_num_steps = 4
81 |
82 | segmentation_min_box_width_px = 4
83 | segmentation_min_charheight_percent = 0.5;
84 | segmentation_max_segment_width_percent_vs_average = 1.35;
85 |
86 | plate_width_mm = 304.8
87 | plate_height_mm = 152.4
88 |
89 | char_height_mm = 70
90 | char_width_mm = 35
91 | char_whitespace_top_mm = 38
92 | char_whitespace_bot_mm = 38
93 |
94 | template_max_width_px = 120
95 | template_max_height_px = 60
96 |
97 | ; Higher sensitivity means less lines
98 | plateline_sensitivity_vertical = 25
99 | plateline_sensitivity_horizontal = 45
100 |
101 | ; Regions smaller than this will be disqualified
102 | min_plate_size_width_px = 70
103 | min_plate_size_height_px = 35
104 |
105 | ocr_language = lus
106 |
107 | [eu]
108 |
109 | ; 35-50; 45-60, 55-70, 65-80, 75-90
110 | char_analysis_min_pct = 0.35
111 | char_analysis_height_range = 0.15
112 | char_analysis_height_step_size = 0.10
113 | char_analysis_height_num_steps = 5
114 |
115 | segmentation_min_box_width_px = 5
116 | segmentation_min_charheight_percent = 0.4;
117 | segmentation_max_segment_width_percent_vs_average = 2.0;
118 |
119 | plate_width_mm = 520
120 | plate_height_mm = 110
121 |
122 | char_height_mm = 80
123 | char_width_mm = 53
124 | char_whitespace_top_mm = 10
125 | char_whitespace_bot_mm = 10
126 |
127 | template_max_width_px = 184
128 | template_max_height_px = 46
129 |
130 | ; Higher sensitivity means less lines
131 | plateline_sensitivity_vertical = 18
132 | plateline_sensitivity_horizontal = 55
133 |
134 | ; Regions smaller than this will be disqualified
135 | min_plate_size_width_px = 100
136 | min_plate_size_height_px = 20
137 |
138 | ocr_language = leu
139 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------