-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathindex.d.ts
57 lines (57 loc) · 1.72 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { IonicNativePlugin } from '@ionic-native/core';
export interface OpenALPROptions {
/** Country used for scanning the license plate */
country?: string;
/** Amount of results returned */
amount?: number;
}
export interface OpenALPRResult {
/** LicensePlate */
number: string;
/** Probability */
confidence: number;
}
/**
* @name OpenALPR
* @description
* This Cordova plugin adds support for the OpenALPR (Automatic License Plate Recognition) library, which provides support for retrieving the license plate from a picture.
*
* @usage
* ```typescript
* 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));
*
* ```
*/
export declare class OpenALPR extends IonicNativePlugin {
Country: {
AU: string;
BR: string;
BR2: string;
EU: string;
IN: string;
KR2: string;
US: string;
VN2: string;
};
/**
* This function does something
* @param imageData {any} Base64 encoding of the image data or the image file URI
* @param options {OpenALPROptions} Options to pass to the OpenALPR scanner
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
scan(imageData: any, options?: OpenALPROptions): Promise<any>;
}