luicfrr / react-native-vision-camera-face-detector

Vision Camera Frame Processor Plugin to detect faces using MLKit Face Detector
https://www.npmjs.com/package/react-native-vision-camera-face-detector
MIT License
77 stars 15 forks source link

example for face marker #11

Closed robertyulisman closed 4 months ago

robertyulisman commented 4 months ago

hallo @nonam4 thanks for your library and this is a great library for face detection, but iam still dont understand how to implement face marker as example i create below, can you provide me to give example how to implement it

this is showing for me image

and this is my code

 {faces !== undefined && faces !== null && (
          <View
            style={{
              position: 'absolute',
              top: faces?.faces[0].bounds.top * (SIZE.width / faces.frame.width),
              left: faces?.faces[0].bounds.left * (SIZE.width / faces.frame.width),
              right: faces?.faces[0].bounds.right * (SIZE.width / faces.frame.width),
              bottom: faces?.faces[0].bounds.bottom * (SIZE.height / faces.frame.height),
              borderWidth: 1,
              zIndex: 999,
              backgroundColor: 'red',
              width: faces?.faces[0].bounds.width * (SIZE.width / faces.frame.width),
              height: faces?.faces[0].bounds.height * (SIZE.height / faces.frame.height),
            }}
          ></View>
        )}
luicfrr commented 4 months ago

I'll provide an example app soon with this feature soon

robertyulisman commented 4 months ago

I'll provide an example app soon with this feature soon

thanks @nonam4 its very helpfull

image