1.0.6 • Published 7 months ago
capacitor-mlkit-ocr
ML Kit for image to text\
Install
npm install capacitor-mlkit-ocr
npx cap sync
API
detectText(...)
detectText(options: DetectImageOptions) => Promise<TextDetectionResult>
Tries to detect text from the given image
Param | Type | Description |
---|
options | DetectImageOptions | Options for the text detection |
Returns: Promise<TextDetectionResult>
Interfaces
TextDetectionResult
Prop | Type | Description |
---|
text | string | Found text |
blocks | Block[] | Parsed text by lines |
Block
Line
DetectImageOptions
Prop | Type | Description |
---|
base64Image | string | The image to detect texts from |
rotation | number | The image's counter-clockwise orientation degrees. Only 0, 90, 180, 270 are supported. Default 0 |