Vision Camera Integration

Vision Camera Integration

The library allows frames from frame processors to be easily converted into OpenCV objects. To install the library and its dependencies, follow these steps.

  1. Add libraries:
yarn add react-native-vision-camera react-native-worklets-core

And then:

cd ios && pod install
  1. Update Info.plist and add the following lines inside tag:
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) needs access to your Camera.</string>
  1. Update AndroidManifest.xml and add the following line inside the tag:
<uses-permission android:name="android.permission.CAMERA" />
  1. Add the babel plugin to your babel.config.js:
module.exports = {
  plugins: [
    ["react-native-worklets-core/plugin"],
    // ...
  ],
  // ...
};
  1. Restart Metro with clean cache:
yarn start --reset-cache

You can find a detailed description of the installation process here (opens in a new tab).

Usage

The methods of use are here.