react-native-object-detector

1.0.8 • Public • Published

react-native-object-detector

Getting started

$ npm install react-native-object-detector --save

Mostly automatic installation

$ react-native link react-native-object-detector

Manual installation

iOS

  1. Add the following to podfile
    pod 'RNObjectDetector', :path => '../node_modules/react-native-object-detector/ios', :subspecs => [
        'ObjectDetector'
    ]
    
  2. Run pod install
  3. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.lts.objectdetector.RNObjectDetectorPackage; to the imports at the top of the file
  • Add new RNObjectDetectorPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-object-detector'
    project(':react-native-object-detector').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-object-detector/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-object-detector')
    
  3. Set screen orientation to portrait in AndroidManifest.xml: android:screenOrientation="portrait"

Usage

import ObjectDetector from 'react-native-object-detector';
 
<ObjectDetector 
    sampleImage={require('./sample.jpg')}
    onObjectCaptured={this.onObjectCaptured}
    detectionCountBeforeCapture={3}
    overlayColor="#00FF0080"
/>
 

Readme

Keywords

Package Sidebar

Install

npm i react-native-object-detector

Weekly Downloads

11

Version

1.0.8

License

none

Unpacked Size

669 kB

Total Files

39

Last publish

Collaborators

  • jackson822