Bug fixed

chrusher/bus_synthesizer
Christopher Usher 4 days ago
parent 656be6c292
commit 64f5873b3b

@ -201,7 +201,8 @@ def recognize_odometer(prototypes, frame):
"""
odo = frame.crop(AREA_COORDS["odo"])
digits = extract_digits(odo, "odo")
mask = Image.open(prototypes['mask'][0])
mask = prototypes['mask']['mask']
mask = mask.convert(mode='L')
digits = [
recognize_digit(prototypes["odo-digits"], digit, mask=mask) for digit in digits[:-1]
] + [
@ -220,7 +221,8 @@ def recognize_odometer(prototypes, frame):
def recognize_clock(prototypes, frame):
clock = frame.crop(AREA_COORDS["clock"])
digits = extract_digits(clock, "clock")
mask = Image.open(prototypes['mask'][0])
mask = prototypes['mask']['mask']
mask = mask.convert(mode='L')
digits = [
recognize_digit(prototypes["odo-digits"], digit, i == 0, mask=mask) for i, digit in enumerate(digits)
]

@ -105,7 +105,7 @@ def do_analyze_segment(dbconnect, *segment_paths, base_dir='.', prototypes_path=
dbmanager = database.DBManager(dsn=dbconnect)
for segment_path in segment_paths:
analyze_segment(db_manager, prototypes, segment_path)
analyze_segment(dbmanager, prototypes, segment_path)
def analyze_segment(db_manager, prototypes, segment_path, check_segment_name=None):

Loading…
Cancel
Save