From 13fbbe84d7932c8d26ffd4bdc5a7990a30392a69 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Fri, 8 Nov 2024 22:44:11 +0800 Subject: [PATCH] pixel coordinates for 2024 buscam --- bus_analyzer/bus_analyzer/extract.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bus_analyzer/bus_analyzer/extract.py b/bus_analyzer/bus_analyzer/extract.py index d060032..e08e3c2 100644 --- a/bus_analyzer/bus_analyzer/extract.py +++ b/bus_analyzer/bus_analyzer/extract.py @@ -9,16 +9,16 @@ import common from common.segments import extract_frame, parse_segment_path -# DB2023 buscam +# DB2024 1080p buscam # bounding box (left x, top y, right x, bottom y) of the area the odometer can be in AREA_COORDS = { - "odo": (1121, 820, 1270, 897), - "clock": (1685, 819, 1804, 877), + "odo": (1053, 857, 1170, 925), + "clock": (1498, 852, 1590, 905) } # starting x coord of each digit within the odo box DIGIT_X_COORDS = { - "odo": [0, 28, 56, 84, 123], - "clock": [0, 27, 66, 93], + "odo": [0, 22, 44, 66, 96], + "clock": [0, 22, 53, 75], } # value of each digit DIGIT_BASES = { @@ -26,12 +26,12 @@ DIGIT_BASES = { "clock": [600, 60, 10, 1], } -DIGIT_WIDTH = 26 +DIGIT_WIDTH = 17 # Most digits we only care about the actual character height -DIGIT_HEIGHT = 26 +DIGIT_HEIGHT = 24 # But last digit we want the full white-background area as we want to try to match # based on position also. -LAST_DIGIT_HEIGHT = 38 +LAST_DIGIT_HEIGHT = 39 # get back py2 zip behaviour _zip = zip