Spaces:
Configuration error
Configuration error
File size: 496 Bytes
26187fd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import cv2
import imutils
# image = cv2.imread('input_image.jpg')
cap = cv2.VideoCapture(1)
while True:
ret, frame = cap.read()
frame = imutils.resize(frame, width=800)
text = "This is my custom text"
cv2.putText(frame, text, (5, 30), cv2.FONT_HERSHEY_COMPLEX_SMALL, 1, (0, 0, 255), 1)
cv2.rectangle(frame, (50, 50), (500, 500), (0, 0, 255), 2)
cv2.imshow('Application', frame)
key = cv2.waitKey(1)
if key == ord('q'):
break
cv2.destroyAllWindows()
|