I am trying to build a face detection module in objective-c using react native. I am using onFacesdetected from react native. But it is not working for me. Below is the code :
<RNCamera
ref={ref => {
this.camera = ref;
}}
style = {styles.preview}
type={RNCamera.Constants.Type.front}
flashMode={RNCamera.Constants.FlashMode.off}
faceDetectionMode={RNCamera.Constants.FaceDetection.Mode.fast}
onFacesDetected={(d)=>{console.log('onFacesDetected',d);}}
permissionDialogTitle={'Permission to use camera'}
permissionDialogMessage={'We need your permission to use your camera phone'}
onGoogleVisionBarcodesDetected={({ barcodes }) => {
console.log(barcodes)
}}
/>
When the camera opens for the first time it prints 'onFacesDetected', { type: 'face', faces: [], target: 27 } after that upon bringing the face in front of camera it does nothing.
Any help would be appreciated.