Skip to content

OP-Engineering/op-ocr

@OP-Engineering/op-ocr

VisionCamera Frame Processor Plugin to detect and read MRZ data from passports using MLKit Text Recognition.

Installation & Configuration

Install

yarn add @op-engineering/op-ocr

Configure

Add the following permission to the AndroidManifest.xml located at ~/android/app/src/AndroidManifest.xml

<uses-permission android:name="android.permission.CAMERA"/>

Basic Usage

import * as React from 'react';

import { StyleSheet, View } from 'react-native';
import { MRZProperties, MRZScanner } from '@op-engineering/op-ocr';

export default function App() {
  return (
    <View style={styles.container}>
      <MRZScanner
        mrzFinalResults={(mrzResults: MRZProperties) => {
          // do something with the results
          console.log('mrzResults: ', JSON.stringify(mrzResults, null, 2));
        }}
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    height: '100%',
    width: '100%',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

Contributing

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

License

MIT

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published