-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathutils.py
More file actions
19 lines (17 loc) · 652 Bytes
/
utils.py
File metadata and controls
19 lines (17 loc) · 652 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import cv2
def screenDebug(frame, *messages):
'''
Displays a given string to the window supplied by frame
:param frame: The window on which the message will be displayed
:param message: The string to show on the given frame
'''
height, width, channels = frame.shape
font = cv2.FONT_HERSHEY_SIMPLEX
defwidth = 10
defheight = height - 20
fontScale = 1
fontColor = (255, 255, 255)
thickness = 1
for index, message in enumerate(messages):
cv2.putText(frame, message, (defwidth, defheight - index * 30),
font, fontScale, fontColor, thickness, cv2.LINE_AA)