Socket
Socket
Sign inDemoInstall

react-native-vision-camera-v3-text-recognition

Package Overview
Dependencies
522
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-vision-camera-v3-text-recognition

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


Version published
Weekly downloads
147
decreased by-30.99%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

NameTypeValuesDefault
languagestringlatin, chinese, devanagari, japanese, koreanlatin

Keywords

FAQs

Last updated on 26 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc