From fcadaffeedc1438942ae7f4de99ec980464386e4 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Mon, 29 Apr 2024 14:31:38 -0400 Subject: Reformat with black --- decoder.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/decoder.py b/decoder.py index b0d06ef..d1065b7 100644 --- a/decoder.py +++ b/decoder.py @@ -1,6 +1,7 @@ import argparse import traceback import cv2 + # import matplotlib.pyplot as plt import numpy as np from creedsolo import RSCodec @@ -84,7 +85,14 @@ while data is None: ccw = cwidth / 2 - 1 M = cv2.getPerspectiveTransform( np.float32([np.flip(widx), np.flip(ridx), np.flip(gidx), np.flip(bidx)]), - np.float32([[ccw, cch], [args.width - ccw - 1, cch], [ccw, args.height - ccw - 1], [args.width - ccw - 1, args.height - cch - 1]]), + np.float32( + [ + [ccw, cch], + [args.width - ccw - 1, cch], + [ccw, args.height - ccw - 1], + [args.width - ccw - 1, args.height - cch - 1], + ] + ), ) frame = cv2.warpPerspective(raw_frame, M, (args.width, args.height)) frame = (np.squeeze(F @ (frame - origin)[..., np.newaxis]) >= 128).astype(np.uint8) -- cgit v1.2.3-70-g09d2