ClearCall

Automatic boundary calls from one camera. This is the Raspberry Pi prototype, running in your browser.

Source on GitHub
—
Click to set the line · drag to draw it at an angle
Ball — Blob — FPS —

How it works

  1. Threshold. Each frame is converted from RGB to HSV, and pixels inside the ball's color range are kept (OpenCV's inRange).
  2. Clean up. One erode and one dilate pass remove specks and fill small holes in the mask.
  3. Find the ball. The largest connected blob above a minimum size is taken as the ball, and its center is tracked.
  4. Make the call. When the center crosses to the OUT side of the line, ClearCall calls it.

The Pi prototype does this with Python and OpenCV and streams the result over WiFi. This page re-implements the same pipeline in plain JavaScript on a canvas, so it needs no server and no install. The full system swaps color tracking for a trained detection model running on edge hardware.