r/computervision • u/DwijWarrior • 22d ago
Showcase Decoding text hidden in motion (Ghost Font) with optical flow + short-window voting, no ML
Ghost Font is a video trick where the text is only visible through motion: two noise fields drift in opposite directions, the letters are one field, the background is the other. Any single frame looks like uniform noise.
I built a decoder (classical CV):
- Farneback flow between every frame pair
- k-means (k=3) on the flow vectors, smaller moving cluster = letter dots
3, sum the masks over short windows (20 frame pairs), OCR each window heatmap with Tesseract, majority vote across reads
Two things that took days:
- The text isn't stationary. It drifts about 55 px up and 30-50 px sideways over the clip, so accumulating the whole video smears the letters. Whole-video heatmap: Tesseract got 0/15. 20 pair windows: it read the text in every window. I was about to train a CNN before I measured the drift.
- Thin strokes die in optical flow. With a 15 px window, small text averaged away. winsize=9 fixed it (one test went 66% to 84% agreement).
Results on 8 videos I recorded from the site's own generator( ghostfont.org ) all decoded correctly. The 36-character max message is the weakest (~60% of reads agree), and a colon came out as a period.
Not a "first to crack it" thing, the site calls it a perception experiment and others decoded it already. I just wanted to see how far plain flow + voting gets.
Check the code out (MIT): https://github.com/deeteecodex/ghostdecode