Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit f29e768

Browse files
committed
Added missing bounds to MLKitDetectFacesResultFace
1 parent 2ebd2f1 commit f29e768

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/mlkit/facedetection/index.android.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export class MLKitFaceDetection extends MLKitFaceDetectionBase {
3333
for (let i = 0; i < faces.size(); i++) {
3434
const face = faces.get(i);
3535
result.faces.push({
36+
bounds: boundingBoxToBounds(face.getBoundingBox()),
3637
smilingProbability: face.getSmilingProbability() !== com.google.firebase.ml.vision.face.FirebaseVisionFace.UNCOMPUTED_PROBABILITY ? face.getSmilingProbability() : undefined,
3738
leftEyeOpenProbability: face.getLeftEyeOpenProbability() !== com.google.firebase.ml.vision.face.FirebaseVisionFace.UNCOMPUTED_PROBABILITY ? face.getLeftEyeOpenProbability() : undefined,
3839
rightEyeOpenProbability: face.getRightEyeOpenProbability() !== com.google.firebase.ml.vision.face.FirebaseVisionFace.UNCOMPUTED_PROBABILITY ? face.getRightEyeOpenProbability() : undefined,

src/mlkit/facedetection/index.ios.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ export function detectFacesOnDevice(options: MLKitDetectFacesOnDeviceOptions): P
9090
smilingProbability: face.hasSmilingProbability ? face.smilingProbability : undefined,
9191
leftEyeOpenProbability: face.hasLeftEyeOpenProbability ? face.leftEyeOpenProbability : undefined,
9292
rightEyeOpenProbability: face.hasRightEyeOpenProbability ? face.rightEyeOpenProbability : undefined,
93-
trackingId: face.hasTrackingID ? face.trackingID : undefined
93+
trackingId: face.hasTrackingID ? face.trackingID : undefined,
94+
bounds: face.frame
9495
});
9596
}
9697
resolve(result);

0 commit comments

Comments
 (0)