From c249d961709cfb1af4ed244b5aaaf28cb71868ef Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Thu, 24 Apr 2025 08:19:34 -0500 Subject: [PATCH] consistency --- .../data_processing/common/license_plate/mixin.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/frigate/data_processing/common/license_plate/mixin.py b/frigate/data_processing/common/license_plate/mixin.py index c67f11956..e471aa304 100644 --- a/frigate/data_processing/common/license_plate/mixin.py +++ b/frigate/data_processing/common/license_plate/mixin.py @@ -1221,10 +1221,7 @@ class LicensePlateProcessingMixin: license_plate_area = (license_plate[2] - license_plate[0]) * ( license_plate[3] - license_plate[1] ) - if ( - license_plate_area - < self.config.cameras[obj_data["camera"]].lpr.min_area - ): + if license_plate_area < self.config.cameras[camera].lpr.min_area: logger.debug(f"{camera}: License plate area below minimum threshold.") return @@ -1318,10 +1315,7 @@ class LicensePlateProcessingMixin: # check that license plate is valid # double the value because we've doubled the size of the car - if ( - license_plate_area - < self.config.cameras[obj_data["camera"]].lpr.min_area * 2 - ): + if license_plate_area < self.config.cameras[camera].lpr.min_area * 2: logger.debug(f"{camera}: License plate is less than min_area") return @@ -1365,10 +1359,10 @@ class LicensePlateProcessingMixin: if ( not license_plate_box or area(license_plate_box) - < self.config.cameras[obj_data["camera"]].lpr.min_area + < self.config.cameras[camera].lpr.min_area ): logger.debug( - f"{camera}: Area for license plate box {area(license_plate_box)} is less than min_area {self.config.cameras[obj_data['camera']].lpr.min_area}" + f"{camera}: Area for license plate box {area(license_plate_box)} is less than min_area {self.config.cameras[camera].lpr.min_area}" ) return