capacitor-mlkit-ocr
v1.0.6
Published
ML Kit for image to text
Maintainers
Readme
capacitor-mlkit-ocr
ML Kit for image to text\
Install
npm install capacitor-mlkit-ocr
npx cap syncAPI
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
| Prop | Type |
| ----------- | ------------------- |
| lines | Line[] |
Line
| Prop | Type |
| -------------- | ------------------ |
| elements | any[] |
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 |
