This Cordova plugin adds support for the OpenALPR (Automatic License Plate Recognition) library, which provides support for retrieving the license plate from a picture.

Ionic 检索车牌OpenALPR插件的安装(Installation)

ionic cordova plugin add cordova-plugin-openalpr npm install @ionic-native/openalpr

Ionic 检索车牌OpenALPR插件支持的平台(Supported Platforms)

  • Android
  • iOS

Ionic 检索车牌OpenALPR插件的用法(Usage)

import { OpenALPR, OpenALPROptions, OpenALPRResult } from '@ionic-native/openalpr';

constructor(private openALPR: OpenALPR) { }

const scanOptions: OpenALPROptions = {
   country: this.openALPR.Country.EU,
   amount: 3

// To get imageData, you can use the @ionic-native/camera module for example. It works with DestinationType.FILE_URI and DATA_URL

this.openALPR.scan(imageData, scanOptions)
  .then((res: [OpenALPRResult]) => console.log(res))
  .catch((error: Error) => console.error(error));