Skip to content
This repository was archived by the owner on Jun 16, 2023. It is now read-only.

Commit 68639b8

Browse files
docs(rncamera): docs for text recognition usage
1 parent fcaa945 commit 68639b8

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# React Native Camera [![Backers on Open Collective](https://opencollective.com/react-native-camera/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/react-native-camera/sponsors/badge.svg)](#sponsors) [![npm version](https://badge.fury.io/js/react-native-camera.svg)](http://badge.fury.io/js/react-native-camera) [![npm downloads](https://img.shields.io/npm/dm/react-native-camera.svg)](https://www.npmjs.com/package/react-native-camera)
22

3-
The comprehensive camera module for React Native. Including photographs, videos, face detection and barcode scanning!
3+
The comprehensive camera module for React Native. Including photographs, videos, face detection, barcode scanning and text recognition (Android only)!
44

55
`import { RNCamera, FaceDetector } from 'react-native-camera';`
66

@@ -87,7 +87,7 @@ pod 'react-native-camera', path: '../node_modules/react-native-camera'
8787
4. In XCode, in the project navigator, select your project. Add `libRNCamera.a` to your project's `Build Phases``Link Binary With Libraries`
8888
5. Click `RNCamera.xcodeproj` in the project navigator and go the `Build Settings` tab. Make sure 'All' is toggled on (instead of 'Basic'). In the `Search Paths` section, look for `Header Search Paths` and make sure it contains both `$(SRCROOT)/../../react-native/React` and `$(SRCROOT)/../../../React` - mark both as `recursive`.
8989

90-
### Face Detection Steps
90+
### Face Detection or Text Recognition Steps
9191

9292
Face Detecion is optional on iOS. If you want it, you are going to need to install Google Mobile Vision frameworks in your project, as mentioned in the next section.
9393

docs/RNCamera.md

+8
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,14 @@ Values: `RNCamera.Constants.FaceDetection.Classifications.all` or `RNCamera.Cons
233233

234234
Classification is determining whether a certain facial characteristic is present. For example, a face can be classified with regards to whether its eyes are open or closed. Another example is whether the face is smiling or not.
235235

236+
### Text Recognition Related props
237+
238+
Only available in Android. RNCamera uses the Google Mobile Vision frameworks for Text Recognition, you can read more info about it [here](https://developers.google.com/vision/android/text-overview).
239+
240+
#### `onTextRecognized`
241+
242+
Method to be called when text is detected. Receives a Text Recognized Event object. The interesting value of this object is the `textBlocks` value, which is an array with objects of the [TextBlock](https://developers.google.com/android/reference/com/google/android/gms/vision/text/TextBlock) properties.
243+
236244
#### `takePictureAsync([options]): Promise`
237245

238246
Takes a picture, saves in your app's cache directory and returns a promise.

0 commit comments

Comments
 (0)