⚙ Vision Engine — Debug

Calibration: 64 squares

📡 Camera Settings

Connection
Statusconnecting…
Camera URL—
Config source—
Last connected—
Resolution—
Frame Relay (for remote VPS)
Relayunknown
Frames pushed—
Last frame age—
Frame size—
Start relay on your laptop:
python relay.py
How the relay works

When Vision Engine runs on a remote VPS, it cannot reach your phone's local IP (10.x.x.x).

relay.py runs on your laptop. It fetches frames from the phone and pushes them to the VPS over HTTPS — outbound only, no firewall rules needed.

The VPS stores the latest frame. Snapshot, stream, board‑view, calibration, and move detection all use it transparently.

If the phone IP changes, update the camera URL in the dashboard and relay.py auto-picks up the new URL within 30 seconds.

📷 Live Camera Feed

connecting…
camera feed

🎯 Board Calibration

64 squares
Auto-detect corners or click manually: TL → TR → BR → BL
No corners selected
Click Auto-Detect to detect the board automatically, or click the 4 corners manually.

🔲 64-Square Overlay

Camera frame with calibration grid drawn on top
calibration overlay

📐 Perspective Board View

Top-down warp of the physical board using calibration
perspective board view

🔬 Detection Pipeline

① Ref Frame
ref frame
before move (capture-ref)
② Cur Frame
cur frame
after move (process-move)
③ Diff Raw
diff raw
absdiff + blur + contrast ×1.3
④ Diff Threshold
diff thresh
binary threshold (MOVE_THRESHOLD)
⑤ Morphology Mask
diff image
dilate×4 + erode×2 + open + close
⑥ Contour Image
contour image
contours + chosen square labels
⑦ Highlight Frame
highlight frame
green=from, red=to (legal moves only)
⑧ Board View (post-move)
board view
perspective warp of cur frame
from_sq—
to_sq—
detected squares—
chosen mapping—
move result—
contour count—
contour areas—
processing time—
timestamp—
Previous FEN (before move)
—
Current FEN (after move)
—

♟ Current Board State

—
Turn—
Move #—
Last move—
Result—
Check—

♟ Previous Board State

—
FEN at the time of last detection (before the move)

📋 PGN — Live Game Record

No game selected.

🎮 Game State

Select a game to see state.

📡 Event Log