I have been trying to use react-native camera to capture an image. This image is given as input into a posenet-model. The detected pose is supposed to be drawn on the canvas.
const takePicture = async () => { if (cameraRef !== null) { const options = {quality: 0.5, base64: true} const data = await cameraRef.current!.takePictureAsync(options) }}takePicture()return (<View style={screenStyle}><RNCamera ref={cameraRef} style={cameraStyle as ViewStyle} type={RNCamera.Constants.Type.back} flashMode={RNCamera.Constants.FlashMode.auto} /><View style={{ flex: 0, flexDirection: 'row', justifyContent: 'center' }}><TouchableOpacity onPress={takePicture} ><Text style={{ fontSize: 14 }}> SNAP </Text></TouchableOpacity></View></View>);
I wanted to know if there is a better way of using the camera to extract frames and process it into the model. Can you help me figure out the logic behind this.
Thank You