0
0
Fork 0
mirror of https://github.com/boltgolt/howdy.git synced 2024-09-19 09:51:19 +02:00

Fix missing colors in overlay

This commit is contained in:
Peter-Simon Dieterich 2019-11-01 11:49:19 +01:00
parent a051e41c06
commit 0444ca933f

View file

@ -124,6 +124,7 @@ try:
frame = clahe.apply(frame)
# Make a frame to put overlays in
overlay = frame.copy()
overlay = cv2.cvtColor(overlay, cv2.COLOR_GRAY2BGR)
# Fetch the frame height and width
height, width = frame.shape[:2]
@ -190,6 +191,7 @@ try:
# Add the overlay to the frame with some transparency
alpha = 0.65
frame = cv2.cvtColor(frame, cv2.COLOR_GRAY2BGR)
cv2.addWeighted(overlay, alpha, frame, 1 - alpha, 0, frame)
# Show the image in a window