Compile OpenALPR for Android with NDK

openalpr-android
openalpr github
openalpr sdk
openalpr python
openalpr dataset
indian number plate-recognition github android
anpr github
openalpr vs opencv

Is there a way to compile the library OpenALPR (https://github.com/openalpr/openalpr) for Android using NDK (ndk-build)?

Compile OpenALPR for Android with NDK, Is there a way to compile the library OpenALPR (https://github.com/openalpr/ openalpr) for Android using NDK (ndk-build)?  Both Tesseract and OpenCV will compile via Android NDK. OpenALPR should have no problem compiling as well. On Thursday, January 23, 2014 6:23:13 AM UTC-7, Rino Seminara A-Tono wrote:

Android compilation, This bash script compiles openalpr for android. You just need to provide the path to Android SDK and Android NDK in the first lines of this code  Android NDK: android-ndk-r10d; OpenCV: OpenCV-2.4.10-android-sdk; Tess-two: commit d0898ff9e7378; OpenALPR: commit 838997925; android-cmake: commit 98d85aeb999 of taka-no-me's fork (which fixes this issue) Note: As of the openalpr commit shown above, the script also runs a patch against the openalpr source to fix a compilation issue in

Yes it should be possible. You'll need to get the Android version of OpenCV and Tesseract setup first. But once that's done, OpenALPR should compile cleanly under Android.

I suspect the performance will not be great, though, on a mobile phone. License plate recognition is a computationally intensive process.

This bash script compiles openalpr for android. You just need to , Tutorial for compiling OpenALPR for Android devices. [Step 0]. Download and deploy android-ndk; Make a symlink to the android-ndk root folder for / opt. [Step 1]. To compile OpenAL a file called config.h is needed.Copy it from <PROJECT_HOME>/openal/android/jni to <PROJECT_HOME>/openal/include. Create Android.mk To tell the NDK compiler what files to compile, we now need to create Android.mk in <PROJECT_HOME>/jni .

Here is the Android.mk content i use :

LOCAL_PATH := $(call my-dir)
LIB_PATH := $(LOCAL_PATH)/../libs/armeabi-v7a

include $(CLEAR_VARS)

LOCAL_MODULE := leptonica
LOCAL_SRC_FILES := liblept.so
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)

LOCAL_MODULE := tesseract
LOCAL_SRC_FILES := libtess.so
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)

LOCAL_MODULE := simpleini
LOCAL_SRC_FILES := libsimpleini.a
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)

LOCAL_MODULE := support
LOCAL_SRC_FILES := libsupport.a
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)

LOCAL_MODULE := openalpr
LOCAL_SRC_FILES := libopenalpr-static.a
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)

OPENCV_INSTALL_MODULES:=on
OPENCV_CAMERA_MODULES:=off

include path_to_opencv4android/OpenCV.mk

LOCAL_MODULE := nativealpr
LOCAL_SRC_FILES := NativeAlpr.cpp
LOCAL_SHARED_LIBRARIES += tesseract leptonica
LOCAL_STATIC_LIBRARIES += openalpr support simpleini

include $(BUILD_SHARED_LIBRARY)

Here is the Application.mk

APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -fexceptions
APP_ABI := armeabi-v7a

In the Android.mk file, the NativeAlpr.cpp file contains the necessary native code to use the OpenALPR library

‍ ‍ ‍ Risk associated with non-confusing hybrid mobile application , Make sure also that your compile mode matches for each of the projects (e.g., Release vs Debug). The OpenALPR library compiles on Android and iOS. Compiling OpenALPR via Build Script; Compile OpenALPR and Dependencies Manually; Linux. Using Precompiled Binaries; Compiling OpenALPR; Compile OpenALPR and all Dependencies; Mac OS X. Using Homebrew; Compiling OpenALPR Manually; Mobile (iOS and Android) Docker; Command Line Utility; OpenALPR API; OpenALPR Agent (alprd) OpenALPR Web Server

Open Source, The tess-two module contains tools for This bash script compiles openalpr for Aug 04, 2012 · Building the Tesseract NDK library for Android August 4, 2012  Automatic License Plate Recognition library. Contribute to openalpr/openalpr development by creating an account on GitHub.

Tesseract android github, LOCAL_C_INCLUDES += /home/matic/Programming/AndroidNDK/platforms/ So I managed to build OpenALPR by defining NO_THREADS  The NDK is not designed for compiling a "C program". The NDK is designed for compiling C/C++ libraries that will be linked into a host Java application. – CommonsWare Jun 25 '12 at 22:11

Building the shared library for Android, Welcome to the OpenALPR community forum. openalpr-android SandroMachado . me one whole week to get to compile OpenALPR for Android (armeabi-v7a), to use the library (but i had no experience neither on Android nor on NDK so it   If you want to compile and run Java/C/C++ apps directly on your Android device, I recommend the Terminal IDE environment from Google Play. It's a very slick package to develop and compile Android APKs, Java, C and C++ directly on your device. The interface is all command line and "vi" based, so it has real Linux feel.

Comments
  • Updated instruction here: github.com/openalpr/openalpr/wiki/Android-compilation
  • Well I didn't read the prerequisites from OpenALPR, you may not have to comment or delete the section in the CMakeLists.txt about alprd ...
  • I am running into this error: [ 93%] Building CXX object CMakeFiles/alprd.dir/daemon.cpp.o /Users/ac-1/Dev/openalpr/src/daemon.cpp:6:30: fatal error: log4cplus/logger.h: No such file or directory ... any ideas where I can find this header file?
  • @Phileo99 I worked around this problem by manually installing log4cplus (sourceforge.net/p/log4cplus/wiki/Home)
  • Hi, I'm interested in a step by step tutorial =)
  • @user1481792 see my new answer for the tutorial ;)
  • Can you indicate me a tutorial or a guide to create a correct Android.mk file for this lib?