Guide

How the on-device MTG card scanner works

Lotus Vault's card scanner recognises a Magic card from your phone's camera entirely inside the browser. It finds the card in the frame, straightens it, reduces its artwork to a 256-bit fingerprint and looks that fingerprint up in a database of about 100,000 printings stored on your device. No photo is sent anywhere, and no AI model takes part. Scanning needs a free account, and the cards you confirm land in your collection, printing by printing.

This guide was written entirely by AI, from Lotus Vault's code and the official sources listed at the end.

From camera frame to card, in four steps

The scanner examines the camera feed several times a second. Each frame goes through the same four steps, all computed on your phone:

  1. Detection and deskew. OpenCV.js, the JavaScript build of the OpenCV image-processing library, looks for a card-shaped outline in the frame. It tries four methods, fastest first, and keeps the first valid result: plain edge detection for well-lit cards with a border, adaptive thresholding for borderless cards and uniform backgrounds, edge detection after contrast equalisation for dim or uneven light, and a global threshold as a last resort. The outline is then corrected for perspective into a flat, upright image of 600 × 840 pixels, the 5:7 shape of a card.
  2. Fingerprint. The straightened card is cropped to its artwork — border, name line and text box left out — turned to grayscale and shrunk to 64 × 64 pixels. A discrete cosine transform splits that image into frequencies. The scanner keeps the lowest 16 × 16, sets aside the first one (overall brightness, left at zero) and turns each of the others into one bit: 1 above their median, 0 below. The result is a 256-bit perceptual hash (pHash), 32 bytes that sum up what the artwork looks like rather than its exact pixels.
  3. Match. The fingerprint is compared with every printing in the downloaded database by Hamming distance: the number of bits that differ, from 0 (identical) to 256. The scanner keeps the five nearest printings; with a set filter on, printings from every other set are skipped entirely.
  4. Vote. A frame only counts if its nearest printing is within 115 bits and the image holds enough edges to be a real card rather than an empty surface. A card is accepted once it has come out on top in at least 4 of the last 8 counted frames, and not again until it has left the frame; the outline drawn over the camera view turns from amber to green as frames start matching.

The fingerprint database

A script on Lotus Vault's server reads Scryfall's bulk data, downloads the image of every paper printing — tokens, emblems and art-series cards are among the exclusions — and fingerprints it with exactly the same steps as your phone. A parity test keeps the server's and the browser's versions bit-identical, and the database records the hashing method it was built with: faced with one built another way, scanning stops rather than quietly recognising the wrong cards.

The scanner in numbers (database built on 18 September 2026)
WhatValue
Printings in the database99,965
Fingerprint per printing256 bits (32 bytes), from the artwork only
First downloadAbout 17 MB of database and 10 MB of OpenCV.js, then cached by the browser
Frame counted as a candidateNearest printing within 115 of 256 bits
Card acceptedSame card on top in at least 4 of the last 8 counted frames
Extra check with a set filterAt least 8 bits ahead of the nearest different card

What stays on your phone

No photo leaves your phone. Recognition has no server step: the camera feed, each frame and each fingerprint stay in the browser tab, and an earlier design that compared images on a server has been removed from the codebase. Nothing that goes over the network comes from your camera:

  • The fingerprint database, about 17 MB, downloaded once from Lotus Vault's own site and then served from your browser's cache. A small manifest, checked each time the scanner opens, lets a rebuilt database replace the old one.
  • OpenCV.js, about 10 MB, fetched once from a public CDN (jsDelivr, with unpkg as a fallback). Before it runs, the file is hashed (SHA-384) and compared with a value pinned in the code. A copy that does not match is never run: the scanner tries the other mirror, and stops if neither matches rather than run a tampered copy with access to your session.
  • After a match, the card's picture is fetched from Scryfall using the matched printing's identifier, and prices come from Lotus Vault's API when you open the review list. Neither request carries anything from your camera.
  • When you add the cards, one request sends the card, the printing and the quantity of each row to your collection. Nothing else.

The crop of each scanned card shown in the review list stays in the page's memory. The queue itself is saved to the tab's session storage so that a refresh does not lose it, but without the crops.

How accurate it is, and why the set filter matters

The scanner tolerates odd angles, glare and uneven light, but the card still has to be visible and legible. Its main limit: the fingerprint describes the artwork, not the card's name or text, so a card reprinted with the same art in several sets has almost the same fingerprint in each. The database covers printings, not just cards, so the scanner tells editions apart when the art differs; when it does not, the nearest printing may not be the one on your table.

The set filter is the lever that narrows this down. With a filter on, only the chosen sets are searched, and a second safeguard applies: the best match must beat the nearest different card by at least 8 bits. That safeguard is deliberately off without a filter, because across the whole catalogue reprints and similar artworks often sit closer than that, and it would reject correct matches. In the validation run behind the thresholds, the vote across frames recognised about 98% of test cards with a set filter active, against about 79% when a single frame had to decide. Filtering to one or two sets when you scan cards from the same edition brings accuracy close to 100%.

Those thresholds are not guesses. A validation script runs 300 deliberately degraded samples of known cards against a freshly built database: true matches differed by a median of 80 bits out of 256, and 90% of them by 108 or fewer, so the per-frame limit of 115 sits just above that 90th percentile. The thresholds are validated by hand on test sets when the database is rebuilt: a step of the documented procedure, not an automatic check.

Tips for clean, fast scans

A few habits make a real difference:

  • Pick the set first. Type a set code or name in the filter: a name such as "Bloomburrow" adds every set whose name contains it — the main set, its Commander decks, promos and so on. You can combine several sets, and the choice is remembered for your next visit.
  • Clear the filter for mixed piles. The filter is strict: a card from any other set can never be recognised. At best it is rejected; at worst it is mistaken for a look-alike from the chosen sets.
  • Give the card light and focus. Glare, on foils especially, can make frames flicker in and out of a match. When your phone's browser allows it, buttons on the camera view switch on the flashlight and zoom in or out (the zoom level is remembered), and tapping the image nudges the focus.
  • One card at a time. Wait for a card to be added, then take it out of the frame. For a second copy of the same card, remove it and present it again: it is not counted twice while it stays in view.
  • Pick by hand when the automatic scan hesitates. Full-art cards, borderless foils and heavy glare can keep the vote from settling. The button at the bottom of the camera view then shows the five nearest candidates for the current frame, from a centred card-shaped crop if no outline is found, plus a search by name.
  • Correct before you add. The last scan can be fixed on the spot, by switching to another printing of the same card or searching for a different card by name. Each row of the review list offers the same two corrections, plus quantity changes and removal.

How it compares with scanner apps

Several dedicated apps scan Magic cards too. The table sticks to what their own pages, store listings or press coverage said when this guide was checked. None of those sources states where their recognition runs, so this guide makes no claim about it either way.

Card scanners compared (sources checked on 26 September 2026)
ScannerRecognitionSet controlWhere recognition runs
Lotus VaultA 256-bit fingerprint of the artwork, matched against about 100,000 printingsFilter to one or several sets, remembered between visitsIn the browser; the code states that no frame is sent to a server
ManaBox"Detects cards using the art"; its F.A.Q. warns that the same art across several releases may resolve to the wrong printingThe scanner can be locked to one setNot stated in its scanner F.A.Q.
Delver LensCards, tokens and emblems "from Alpha to the most recent set"Not covered by the sources checkedNot stated in the sources checked
Dragon Shield MTG ScannerScans cards "in any language", with real-time translationsNot covered by the sources checkedNot stated in the sources checked

Beyond recognition, the apps differ in what surrounds it. Delver Lens integrates TCGplayer and Cardmarket prices, a Card Kingdom buy and sell flow and offline Oracle text. Dragon Shield's scanner is free with optional in-app purchases, adds social and trading features, and its publisher advertises 18 million cards scanned per month — a marketing figure, not an independently verified one. ManaBox recommends a plain background and good lighting. On Lotus Vault's side, the database leaves out tokens and emblems, and scanning needs an account; in exchange, what you scan goes straight into a collection kept at the printing level.

Who can use it, and where the cards go

The scanner is part of the signed-in app. It is free, like the rest of Lotus Vault, but it needs an account — unlike the public solo playtester, which works without one — because what you scan is meant to end up in your collection. Your browser asks for camera access the first time you open it.

Each accepted card joins a review queue. Scanning the same printing again raises its quantity, and each addition can be undone for a few seconds. The review list shows each printing's Cardmarket price and the running value of the batch. Nothing is saved until you add the batch to your collection, in a single request that records each card with its exact printing: the same card scanned from two different sets becomes two owned printings. The queue survives a refresh of the tab but not closing it, and the scanner asks for confirmation before you leave with unsaved scans.

Owned cards then count in each deck's shopping list, which compares the deck with your collection. For the short version of how recognition works, see the scanner section of the About page.

Scanning is free: create an account, open Scan from the menu and point your phone at a card.

Create a free account

Related guides

Sources

Last updated: September 26, 2026