├── app ├── .idea │ ├── .name │ ├── copyright │ │ └── profiles_settings.xml │ ├── modules.xml │ ├── vcs.xml │ ├── gradle.xml │ ├── compiler.xml │ ├── misc.xml │ └── workspace.xml ├── .gitignore ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── jniLibs │ │ └── armeabi-v7a │ │ │ ├── liblept.so │ │ │ ├── libtess.so │ │ │ ├── libopencv_java.so │ │ │ └── libopenalpr-native.so │ │ ├── assets │ │ └── runtime_data │ │ │ ├── keypoints │ │ │ ├── eu │ │ │ │ ├── au.jpg │ │ │ │ ├── be.jpg │ │ │ │ ├── bg.jpg │ │ │ │ ├── cy.jpg │ │ │ │ ├── de.jpg │ │ │ │ ├── dk.jpg │ │ │ │ ├── eng.jpg │ │ │ │ ├── est.jpg │ │ │ │ ├── fr.jpg │ │ │ │ ├── it.jpg │ │ │ │ ├── nl.jpg │ │ │ │ ├── es2000.jpg │ │ │ │ ├── es2006.jpg │ │ │ │ ├── gb2000.jpg │ │ │ │ ├── gb2006.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 │ │ │ │ ├── ky2005.jpg │ │ │ │ ├── la2006.jpg │ │ │ │ ├── ma1987.jpg │ │ │ │ ├── md2006.jpg │ │ │ │ ├── me1999.jpg │ │ │ │ ├── mi2007.jpg │ │ │ │ ├── mn2000.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 │ │ │ │ ├── ks2007b.jpg │ │ │ │ ├── md2006b.jpg │ │ │ │ ├── md2006c.jpg │ │ │ │ ├── me1999b.jpg │ │ │ │ └── mo2006b.jpg │ │ │ ├── ocr │ │ │ └── tessdata │ │ │ │ ├── leu.traineddata │ │ │ │ └── lus.traineddata │ │ │ ├── postprocess │ │ │ ├── readme.txt │ │ │ ├── eu.patterns │ │ │ └── us.patterns │ │ │ └── region │ │ │ └── eu.xml │ │ └── java │ │ └── org │ │ └── openalpr │ │ ├── model │ │ ├── Coordinate.java │ │ ├── ResultsError.java │ │ ├── Results.java │ │ ├── Candidate.java │ │ └── Result.java │ │ ├── AlprJNIWrapper.java │ │ ├── util │ │ └── Utils.java │ │ └── OpenALPR.java ├── build.gradle └── proguard-rules.pro ├── settings.gradle ├── Sample └── OpenALPRSample │ ├── app │ ├── .gitignore │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.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 │ │ │ └── layout │ │ │ │ └── activity_main.xml │ │ │ ├── ic_launcher-web.png │ │ │ ├── AndroidManifest.xml │ │ │ ├── assets │ │ │ └── runtime_data │ │ │ │ └── openalpr.conf │ │ │ └── java │ │ │ └── com │ │ │ └── sandro │ │ │ └── openalprsample │ │ │ └── MainActivity.java │ ├── proguard-rules.pro │ └── build.gradle │ ├── settings.gradle │ ├── .gitignore │ ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties │ ├── build.gradle │ ├── gradle.properties │ ├── gradlew.bat │ └── gradlew ├── images ├── screencast.gif └── screenshot.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── README.md ├── openalpr.conf ├── CHANGELOG.md ├── gradlew └── LICENSE /app/.idea/.name: -------------------------------------------------------------------------------- 1 | app -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | /build 3 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /Sample/OpenALPRSample/app/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | /build 3 | -------------------------------------------------------------------------------- /images/screencast.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/images/screencast.gif -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/images/screenshot.png -------------------------------------------------------------------------------- /app/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Sample/OpenALPRSample/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':OpenALPR' 2 | 3 | project(':OpenALPR').projectDir = new File('../../app') 4 | -------------------------------------------------------------------------------- /Sample/OpenALPRSample/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | OpenALPRSample 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/liblept.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/app/src/main/jniLibs/armeabi-v7a/liblept.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libtess.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/app/src/main/jniLibs/armeabi-v7a/libtess.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libopencv_java.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/app/src/main/jniLibs/armeabi-v7a/libopencv_java.so -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/keypoints/eu/au.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/app/src/main/assets/runtime_data/keypoints/eu/eng.jpg -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/keypoints/eu/est.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/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/HEAD/app/src/main/assets/runtime_data/keypoints/eu/fr.jpg -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/keypoints/eu/it.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/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/HEAD/app/src/main/assets/runtime_data/keypoints/eu/nl.jpg -------------------------------------------------------------------------------- /Sample/OpenALPRSample/app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/Sample/OpenALPRSample/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/keypoints/eu/es2000.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/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/HEAD/app/src/main/assets/runtime_data/keypoints/eu/es2006.jpg -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/keypoints/eu/gb2000.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/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/HEAD/app/src/main/assets/runtime_data/keypoints/eu/gb2006.jpg -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/keypoints/eu/pl2000.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/app/src/main/assets/runtime_data/keypoints/us/in2009.jpg -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/keypoints/us/ky2005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/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/HEAD/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/HEAD/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/HEAD/app/src/main/assets/runtime_data/keypoints/us/md2006.jpg -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/keypoints/us/me1999.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/app/src/main/assets/runtime_data/keypoints/us/me1999.jpg -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/keypoints/us/mi2007.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/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/HEAD/app/src/main/assets/runtime_data/keypoints/us/mn2000.jpg -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/keypoints/us/mo2009.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/app/src/main/assets/runtime_data/keypoints/us/wy2000.jpg -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libopenalpr-native.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/app/src/main/jniLibs/armeabi-v7a/libopenalpr-native.so -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/keypoints/us/ks2007b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/app/src/main/assets/runtime_data/keypoints/us/ks2007b.jpg -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/keypoints/us/md2006b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/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/HEAD/app/src/main/assets/runtime_data/keypoints/us/md2006c.jpg -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/keypoints/us/me1999b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/app/src/main/assets/runtime_data/keypoints/us/me1999b.jpg -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/keypoints/us/mo2006b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/app/src/main/assets/runtime_data/keypoints/us/mo2006b.jpg -------------------------------------------------------------------------------- /app/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/assets/runtime_data/ocr/tessdata/leu.traineddata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/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/HEAD/app/src/main/assets/runtime_data/ocr/tessdata/lus.traineddata -------------------------------------------------------------------------------- /.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/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/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/HEAD/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/HEAD/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/HEAD/Sample/OpenALPRSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Sample/OpenALPRSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SandroMachado/openalpr-android/HEAD/Sample/OpenALPRSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Sample/OpenALPRSample/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | -------------------------------------------------------------------------------- /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/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 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 -------------------------------------------------------------------------------- /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/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 | } -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # openalpr-android 2 | [![Release](https://jitpack.io/v/SandroMachado/openalpr-android.svg)](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 | ![Screenshot](images/screenshot.png "Main Activity Sample application") 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 | ![Screencast](images/screencast.gif "Main Activity Sample application screencast") 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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 |