ORB feature detection — computer vision in the browser
ORB (Oriented FAST + rotated BRIEF) finds distinctive keypoints and describes them — a fast, patent-free alternative to SIFT/SURF for matching and tracking in computer vision. This fetches a textured photo and draws the keypoints with cv2.ORB_create. Run it live.
Example code (Python / OpenCV)
"""
ORB feature detection
ORB (Oriented FAST + rotated BRIEF) finds distinctive keypoints and describes them — a fast, patent-free alternative to SIFT/SURF for matching and tracking in computer vision. This fetches a textured photo and draws the keypoints with cv2.ORB_create. Run it live.
"""
import cv2
import requests
import numpy as np
# A real photo, fetched live from the web — nothing is uploaded
url = "https://images.unsplash.com/photo-1543872084-c7bd3822856f?w=480&q=70"
# no-cache: always fetch a fresh copy so a stale browser-cache entry can't break decoding
resp = requests.get(url, headers={"Cache-Control": "no-cache"})
img = cv2.imdecode(np.frombuffer(resp.content, np.uint8), cv2.IMREAD_COLOR)
orb = cv2.ORB_create(150) # keep the 150 strongest keypoints (try 300)
kp = orb.detect(img, None)
out = img.copy()
for k in kp:
cv2.circle(out, (int(k.pt[0]), int(k.pt[1])), 3, (0, 255, 0), -1) # small dots
print(len(kp), "ORB keypoints")
cv2.imshow("ORB keypoints", out)