diff options
author | Anthony Wang | 2024-04-29 14:31:38 -0400 |
---|---|---|
committer | Anthony Wang | 2024-04-29 14:31:38 -0400 |
commit | fcadaffeedc1438942ae7f4de99ec980464386e4 (patch) | |
tree | 0eec6f170d3e43190e0c9ef4bc25ea8358617a0d | |
parent | 270dcaa6597db99c0034914bd36d22ae8a893396 (diff) |
Reformat with black
-rw-r--r-- | decoder.py | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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) |