rn-text-recognition
v1.0.1
Published
A package for OCR
Downloads
4
Readme
rn-text-recognition
rn-text-recognition is a utility package for React Native that provides methods to capture images using the device's camera and perform text recognition on the captured images using Google's MLKIT on device learning.
Installation
Install the package from npm:
npm install rn-text-recognition --save
Usage
The library provides a simple API with a main method:
### `recognizeText(imageData: string)`
This method takes the captured image data as input and performs text recognition on it. The imageData
parameter should be a base64-encoded string representing the image.
import ReactNativeOCR from 'rn-text-recognition';
After capturing the image or selecting image, call recognizeText method with the image data.
Assuming you have the image data in a variable called imageData
const recognizedText = await ReactNativeOCR.recognizeText(imageData);