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

cyrusbehr picture cyrusbehr · Jul 9, 2017 · Viewed 6.9k times · Source

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!

Answer

kGielo picture kGielo · Aug 17, 2017

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: