Drawing shapes & text — computer vision in the browser
The starting point for computer vision in OpenCV: build an image from scratch and draw on it. cv2.rectangle, cv2.circle and cv2.putText compose shapes and labels on a numpy array — handy for annotating detections or making test images. Run it live and tweak the coordinates.
Example code (Python / OpenCV)
import cv2
import numpy as np
# Build an image from scratch and draw on it (no upload needed)
img = np.zeros((300, 400, 3), dtype=np.uint8)
cv2.rectangle(img, (50, 50), (350, 250), (0, 165, 255), -1) # orange (BGR)
cv2.circle(img, (200, 150), 60, (255, 255, 255), -1)
cv2.putText(img, "TinkerCV", (95, 160), cv2.FONT_HERSHEY_SIMPLEX, 1.2, (0, 0, 0), 2)
cv2.imshow("canvas", img)
print("Drew a rectangle, circle and text. Edit the coordinates and Run to tinker!")