Spaces:
Configuration error
Configuration error
Download opencv-example.py from Ibtehaj10/cheating-detection: direct link, hf CLI and curl.
- Browser
- Download file 496 Bytes
-
https://huggingface.co/spaces/Ibtehaj10/cheating-detection/resolve/main/opencv-example.py
- Command line
-
hf download hf://spaces/Ibtehaj10/cheating-detection/opencv-example.py
-
curl -L -o opencv-example.py https://huggingface.co/spaces/Ibtehaj10/cheating-detection/resolve/main/opencv-example.py
496 Bytes
| 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() | |