6.0.0 • Published 4 days ago

@pantrist/capacitor-plugin-ml-kit-text-recognition v6.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 days ago

@pantrist/capacitor-plugin-ml-kit-text-recognition

npm version npm downloads per month

Capacitor Wrapper for TextRecognition of Googles ML-Kit

Install

npm install @pantrist/capacitor-plugin-ml-kit-text-recognition
npx cap sync

Configuration

Android

Optional but recommended: You can configure your app to automatically download the ML model to the device after your app is installed from the Play Store. To do so, add the following declaration to your app's AndroidManifest.xml file:

<application ...>
  ...
  <meta-data
      android:name="com.google.mlkit.vision.DEPENDENCIES"
      android:value="ocr" />
  <!-- To use multiple models: android:value="ocr,model2,model3" -->
</application>

iOS

Nothing to do for iOS

Supported methods

NameAndroidiOSWeb
detectText

API

detectText(...)

detectText(options: DetectImageOptions) => Promise<TextDetectionResult>

Tries to detect text from the given image

ParamTypeDescription
optionsDetectImageOptionsOptions for the text detection

Returns: Promise<TextDetectionResult>


Interfaces

TextDetectionResult

PropTypeDescription
textstringFound text
blocksBlock[]Parsed text by lines

Block

PropType
linesLine[]

Line

PropType
elementsElement[]

Element

DetectImageOptions

PropTypeDescription
base64ImagestringThe image to detect texts from
rotationnumberThe image's counter-clockwise orientation degrees. Only 0, 90, 180, 270 are supported. Default 0
6.0.0

4 days ago

5.1.1

6 months ago

5.1.0

6 months ago

5.0.1

7 months ago

5.0.0

1 year ago

4.1.1

1 year ago

4.1.0

1 year ago

4.0.1

2 years ago

4.0.0

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago