How it works
The captured frame is run through an adaptive threshold to separate marker candidates from the background. Contours are traced and filtered down to quadrilateral shapes, which are perspective-unwarped into a flat grid, then decoded into a bit pattern and matched against a marker dictionary by Hamming distance. Everything happens locally in the browser — no video or images are ever sent anywhere.
Why capture instead of continuous scanning? A marker's dictionary can't be told from the picture alone — at loose tolerances every dictionary will happily decode another dictionary's marker into a plausible-looking but wrong ID. Identifying it properly means running all eight dictionaries over the same frame and ranking the results: exact bit matches win, and any dictionary that reports the same ID twice is thrown out, because a real board never repeats an ID. That costs about 40ms, which is unnoticeable once per capture but too slow to do every frame.
Need a marker to test?
Generate one with the js-aruco2 marker creator, print or display it, and point your camera at it.
Marker detection is powered by the open-source js-aruco2 library (MIT/BSD licensed).
Supported dictionaries
The scanner reads DICT_4X4_1000, DICT_5X5_1000, DICT_6X6_1000, DICT_7X7_1000, the original ArUco dictionary, ArUco MIP 36h12 and AprilTag 36h11. The smaller predefined OpenCV sets — DICT_4X4_50, DICT_5X5_100, DICT_6X6_250 and friends — are subsets of these larger tables, so markers generated with them are read correctly and report the same ID.
Frequently asked questions
How do I read an ArUco marker ID?
Start the camera, fill the frame with the marker and tap Capture. Every marker found is outlined on the photo with its numeric ID, and the IDs are listed below it. Nothing to install.
How do I know which dictionary a marker belongs to?
Leave the picker on Auto-identify. Every dictionary is run over the captured frame and the results are ranked — exact bit matches win, and any dictionary that decodes the same ID twice is thrown out. This step matters more than it sounds: at loose tolerances a 6x6 marker will decode as a perfectly plausible — and completely wrong — 4x4 ID.
Can it scan a ChArUco calibration board?
Yes. All markers on the board are read in one capture and every ID is listed. Several markers agreeing on one dictionary is also the strongest available evidence that the dictionary was identified correctly.
Are my camera images uploaded anywhere?
No. Detection runs in your browser in JavaScript. No frames are sent to a server and nothing is stored.
Why is my marker not detected?
Usually one of: the marker is too small in frame, glare or reflection is washing out the border, the shot is motion-blurred, or the marker has no white margin around its black border. Photographing a marker displayed on a screen adds moire interference that can hide the marker entirely — stepping back a little normally fixes it.