From 473eb0a17e3ef3dc054179c8aa8b9f14dd0635e4 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Wed, 22 Mar 2023 17:47:49 -0700 Subject: [PATCH] fr: add more casts Signed-off-by: Varun Patil --- lib/Controller/PeopleFaceRecognitionController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Controller/PeopleFaceRecognitionController.php b/lib/Controller/PeopleFaceRecognitionController.php index 63d1a2fa..5065e883 100644 --- a/lib/Controller/PeopleFaceRecognitionController.php +++ b/lib/Controller/PeopleFaceRecognitionController.php @@ -54,10 +54,10 @@ class PeopleFaceRecognitionController extends GenericClusterController { // Convert to recognize format (percentage position-size) foreach ($photos as &$p) { - $p['x'] = (float) $p['x'] / $p['image_width']; - $p['y'] = (float) $p['y'] / $p['image_height']; - $p['width'] = (float) $p['width'] / $p['image_width']; - $p['height'] = (float) $p['height'] / $p['image_height']; + $p['x'] = (float) $p['x'] / (float) $p['image_width']; + $p['y'] = (float) $p['y'] / (float) $p['image_height']; + $p['width'] = (float) $p['width'] / (float) $p['image_width']; + $p['height'] = (float) $p['height'] / (float) $p['image_height']; } $this->sortByScores($photos);