README
Virtual Blur Cam
This is a very crude version from virtual-background only used to get a camera stream with background blur
npm install blur-cam-stream
Dependencies
1)
You will need to put segm_lite_v681.tflite in app public folder. It's need to be requested with:
fetch("./segm_lite_v681.tflite");
2)
Insert tflite-simd.js in public folder.
You will need to insert in index.html head tag:
<script src="%PUBLIC_URL%/tflite-simd.js"></script>
How to get Stream
import { BlurStream } from 'blur-cam';
const blurStream = new BlurStream();
// First param video track constraints
// Second param output stream fps
// Example with default params
const blurStream = await blurStream.getBlurStream({
{ deviceId: "default" },
30
})
// Dont forget to stop camera stream when not necessary
blurStream.stop();