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
127 stars 22 forks source link

Why orientation not being used for bounding boxes on ios? #108

Open frodriguez-hu opened 3 weeks ago

frodriguez-hu commented 3 weeks ago

Hi! I just wanted to know why orientation is not being used to set the bounding boxes on ios like is used on android?

felire commented 2 weeks ago

For example, I found that this

 case .left:
    return [
        "width": height,
        "height": width,
        "x": sourceWidth * scaleX - x - height + (height - width)/2,
        "y": y - (width - height)/2
    ]

is more accurate on portrait on IOS