Ask Your Question
0

Can I use cv2.putText on a window without an image?

asked 2019-10-16 13:01:22 -0500

emily gravatar image

Or is there any alternatives for me to do so? Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-10-16 13:08:41 -0500

berak gravatar image

in short, -- NO.

but it's so easy to create an empty numpy array as a background, ....

canvas = np.zeros((200,200,3), np.uint8) <-- ! there you go ! 
cv2.putText(canvas, "helo ;]", .....)
cv2.imshow("X", canvas)
cv2.waitKey()
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-10-16 13:01:22 -0500

Seen: 22 times

Last updated: Oct 16