Thicker edges for mixing video

This commit is contained in:
Anthony Wang 2024-05-14 11:22:33 -04:00
parent b5a725174a
commit 170c85404b
Signed by: a
SSH key fingerprint: SHA256:B5ADfMCqd2M7d/jtXDoihAV/yfXOAbWWri9+GdCN4hQ
2 changed files with 2 additions and 2 deletions

View file

@ -43,7 +43,7 @@ def find_corner(A, f):
return np.average(np.where(mask), axis=1), np.average(A[mask], axis=0).astype(np.float64)
if args.input.isdecimal():
if isinstance(args.input, str) and args.input.isdecimal():
args.input = int(args.input)
cap = cv2.VideoCapture(args.input)
data = None

View file

@ -90,7 +90,7 @@ if args.mix:
vidframe[hscale * (args.height - cheight) :, wscale * (args.width - cwidth) :] = 0
frame = np.repeat(np.repeat(mkframe(packets[i]), hscale, 0), wscale, 1)
# Set edges in original video to black
frame[(32 <= vidframe) & (vidframe < 224)] = 0
frame[vidframe % 255 != 0] = 0
out.write(cv2.cvtColor(frame, cv2.COLOR_RGB2BGR))
i = (i + 1) % len(packets)
else: