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.
- Add libraries:
yarn add react-native-vision-camera react-native-worklets-core
And then:
cd ios && pod install
- Update
Info.plist
and add the following lines insidetag:
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) needs access to your Camera.</string>
- Update
AndroidManifest.xml
and add the following line inside thetag:
<uses-permission android:name="android.permission.CAMERA" />
- Add the babel plugin to your
babel.config.js
:
module.exports = {
plugins: [
["react-native-worklets-core/plugin"],
// ...
],
// ...
};
- 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.