1.0.9 • Published 2 years ago

test-npmneox131 v1.0.9

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

React-Native-Text-Recognition

Very basic text recognition utilizing the Vision framework on iOS and Firebase ML on Android

I also have a version that utilizes Firebase ML on both iOS and Android. You can check that out or install it on the ml-only branch!

Installation

yarn add react-native-text-recognition

or with NPM:

npm install react-native-text-recognition

iOS:

Make sure that your Podfile's minimum deployment target is 13.0 or greater!!

If you get an error about "Could not find or use auto-linked library 'xxxxx'" then add the following to your project's Build Settings under LIBRARY_SEARCH_PATHS:

"$(SDKROOT)/usr/lib/swift"

This error is most common on XCode 12+

Usage

import TextRecognition from 'react-native-text-recognition';

// pass the image's path to recognize

const result = await TextRecognition.recognize('/var/mobile/...');

Configuration and Options

There is an optional configuration object affecting iOS vision only. It includes one key, visionIgnoreThreshold which is a number (<= 1).

type TextRecognitionOptions = {
  visionIgnoreThreshold?: number;
};

It is used at the end of the recognize function:

const result = await TextRecognition.recognize('/var/mobile/...', {
  visionIgnoreThreshold: 0.5,
});

The only thing that this changes is whether or not to return a recognized string based on the Vision Framework's "confidence." You can read more at https://developer.apple.com/documentation/vision/vnobservation/2867220-confidence/

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago