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

Commit

Permalink
docs(rncamera): docs for text recognition usage
Browse files Browse the repository at this point in the history
  • Loading branch information
alculquicondor committed Mar 22, 2018
1 parent fcaa945 commit 68639b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 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)!

This comment has been minimized.

Copy link
@gabrielfalcao

gabrielfalcao Jun 17, 2018

Contributor

Hey, I'm new to this library and want to use it for iOS, but I'm confused by "(Android Only)".
Is the whole library android-only or is just the "text recognition" android-only?

This comment has been minimized.

Copy link
@sibelius

sibelius Jun 17, 2018

Collaborator

only text recognition for now.

can u send a pr making this clear in docs?


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

Expand Down Expand Up @@ -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.

Expand Down
8 changes: 8 additions & 0 deletions docs/RNCamera.md
Expand Up @@ -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.
Expand Down

0 comments on commit 68639b8

Please sign in to comment.