diff --git a/README.md b/README.md index 159b155d9..db332336d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 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) -The comprehensive camera module for React Native. Including photographs, videos, face detection and barcode scanning! +The comprehensive camera module for React Native. Including photographs, videos, face detection, barcode scanning and text recognition (Android only)! `import { RNCamera, FaceDetector } from 'react-native-camera';` @@ -87,7 +87,7 @@ pod 'react-native-camera', path: '../node_modules/react-native-camera' 4. In XCode, in the project navigator, select your project. Add `libRNCamera.a` to your project's `Build Phases` ➜ `Link Binary With Libraries` 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`. -### Face Detection Steps +### Face Detection or Text Recognition Steps 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. diff --git a/docs/RNCamera.md b/docs/RNCamera.md index 8b886d934..78f882715 100644 --- a/docs/RNCamera.md +++ b/docs/RNCamera.md @@ -233,6 +233,14 @@ Values: `RNCamera.Constants.FaceDetection.Classifications.all` or `RNCamera.Cons 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. +### Text Recognition Related props + +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). + +#### `onTextRecognized` + +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. + #### `takePictureAsync([options]): Promise` Takes a picture, saves in your app's cache directory and returns a promise.