Coder Social home page Coder Social logo

pedrol2b / react-native-vision-camera-v4-text-recognition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gev2002/react-native-vision-camera-v3-text-recognition

1.0 0.0 0.0 44 KB

Home Page: https://github.com/gev2002/react-native-vision-camera-v3-text-recognition

License: MIT License

JavaScript 0.42% Ruby 6.08% Objective-C 33.83% Kotlin 38.73% TypeScript 20.94%
react-native-vision react-native-vision-camera

react-native-vision-camera-v4-text-recognition's Introduction

The frame processor plugin for text recognition using Google ML Kit library for react-native-vision-camera with high performance.

🚨 Required Modules

react-native-vision-camera => 4.0.0
react-native-worklets-core = 1.2.0

💻 Installation

npm install react-native-vision-camera-v3-text-recognition
yarn add react-native-vision-camera-v3-text-recognition

👷Features

Easy To Use.
Works Just Writing few lines of Code.
Works With React Native Vision Camera.
Works for Both Cameras.
Works Fast.
Works With Android 🤖 and IOS.📱
Writen With Kotlin and Objective-C.

💡 Usage

import React, { useState } from 'react'
import { useCameraDevice } from 'react-native-vision-camera'
import { Camera } from 'react-native-vision-camera-v3-text-recognition';

function App (){
  const [data,setData] = useState(null)
  const device = useCameraDevice('back');
  console.log(data)
  return(
    <>
      {!!device && (
        <Camera
          style={StyleSheet.absoluteFill}
          device={device}
          isActive
          // optional
          options={{
            language:'latin'
          }}
          callback={(d) => setData(d)}
        />
      )}
    </>
  )
}

Also You Can Use Like This

import React from 'react';
import { StyleSheet } from "react-native";
import {
  Camera,
  useCameraDevice,
  useFrameProcessor,
} from "react-native-vision-camera";
import { useTextRecognition } from "react-native-vision-camera-v3-text-recognition";

function App() {
  const device = useCameraDevice('back');
  const options = { language : 'latin' }
  const {scanText} = useTextRecognition(options)
  const frameProcessor = useFrameProcessor((frame) => {
    'worklet'
    const data = scanText(frame)
	console.log(data, 'data')
  }, [])
  return (
      <>
      {!!device && (
        <Camera
          style={StyleSheet.absoluteFill}
          device={device}
          isActive
          frameProcessor={frameProcessor}
        />
      )}
      </>
  );
}
export default App;

⚙️ Options

Name Type Values Default
language string latin, chinese, devanagari, japanese, korean latin

react-native-vision-camera-v4-text-recognition's People

Contributors

gev2002 avatar pedrol2b avatar

Stargazers

Pedro kunrath  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.