Menu

Why red ink vanishes under a red sheet, and how I made an iPhone do it
📰

Why red ink vanishes under a red sheet, and how I made an iPhone do it

DEV Community: ios·Johnny Nguyen·1 day ago
#8x3kfPoQ
#devtoios#devto#dev#sheet#paper
Reading 0:00
15s threshold

I work on Red Sheet at W Lab. Students in Japan write answers in red or orange pen, lay a sheet of red plastic over the page, and the answers disappear while the black questions stay. Slide the sheet down and you check yourself one line at a time. Red Sheet is an iPhone and iPad app that does this to a photo of your own notebook. This post is about the engine that finds the ink and hides it.

Why the paper trick works, and why a filter isn't enough

Red plastic passes red light and blocks the rest. Through it, white paper looks red and red ink looks red, so the ink has nothing to stand out against. Black ink reflects no red either way, so it stays dark. Green highlighter is the opposite case: it reflects almost no red, so through the sheet it turns nearly black and blocks the word under it.

The obvious way to copy that on a phone is to take the photo's red channel and tint it. I kept that version in the code as a comparison, and it fails on real photos.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.