Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to obtain frames from react-native-camera in real time

I am using the react-native-camera component (https://github.com/lwansbrough/react-native-camera) in an application I am developing.

Is there any way to obtain the individual frames from the video / camera feed such that I may perform processing in real time.

My end goal is to use the tracking.js library to track objects in real time in order to to implement an AR effect.

Thanks for the help!

like image 686
cyrusbehr Avatar asked Jul 09 '17 03:07

cyrusbehr


People also ask

Is react native 60 fps?

The views in React Navigation use native components and the Animated library to deliver 60 FPS animations that are run on the native thread.

Can you use camera with react native?

React Native Camera is an incredible package to help developers use the device camera for iOS and Android apps built with React Native. Besides our example QR code scanner, you can also do text recognition, face detection, and capture video and images.

How do you use native camera react native?

You just have to import the core React Native components such as View and Alert as well as RNCamera from react-native-camera . Then, create a class component App that is going to render the JSX that uses a hardware camera on the device's screen. This going to be done by wrapping the RNCamera component inside a View .


Video Answer


1 Answers

Sorry, with this module you can't do this.

Check this out

On other hand, using javascript to get real-time data and then using javascript to track objects is really bad for performance especially on mobile devices with ReactNative (ref)

You could just write your own module, where you have CameraView and all things related to tracking happening on the native side.

I found these modules which can help you in writing your own tracking module for ReactNative:

  • https://github.com/ugiacoman/react-native-opencv
  • https://github.com/cardash/react-native-openalpr
like image 65
kGielo Avatar answered Oct 16 '22 11:10

kGielo