Last active
June 26, 2023 06:51
-
-
Save qwertyz15/a7250c87db334a23adca13b66465b8ff to your computer and use it in GitHub Desktop.
python put_text.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def draw_str(dst, target, s): | |
x, y = target | |
cv.putText(dst, s, (x+1, y+1), cv.FONT_HERSHEY_PLAIN, 1.0, (0, 0, 0), thickness = 2, lineType=cv.LINE_AA) | |
cv.putText(dst, s, (x, y), cv.FONT_HERSHEY_PLAIN, 1.0, (255, 255, 255), lineType=cv.LINE_AA) | |
draw_str(res, (20, 20), "threaded : " + str(threaded_mode)) | |
draw_str(res, (20, 40), "latency : %.1f ms" % (latency.value*1000)) | |
draw_str(res, (20, 60), "frame interval : %.1f ms" % (frame_interval.value*1000)) | |
draw_str(res, (20, 80), "fps : %.1f" % (1/frame_interval.value)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment