Menu

Vertical Japanese broke my OCR: how I group manga text into speech bubbles on iOS
📰

Vertical Japanese broke my OCR: how I group manga text into speech bubbles on iOS

DEV Community: ios·Tedy Mezaguer·1 day ago
#jw8QVTfm
#devtoios#devto#dev#manga#bubble
Reading 0:00
15s threshold

Point a general camera translator at a page of raw manga and you get one of two results. A single paragraph of English in an order that makes no sense, or one tiny box per column of text, each translated on its own, so nothing reads like a sentence.

I build Yomi, an iOS app for reading manga that only exists in Japanese, and most of the work turned out not to be translation at all. It was geometry: deciding which pieces of text belong to the same speech bubble, in what order to read them, and where to put the English afterwards. This post is about that part.

Why manga pages are hard for OCR

Three things a sign or a menu never does to you:

Vertical text. Japanese bubbles are usually written in columns, top to bottom, and the columns read right to left. OCR engines tend to return each column as its own line.

Many separate blocks. A page has eight to fifteen bubbles. A translator that treats the page as one block of text merges dialogue from different characters.

Small text at page scale.…

Continue reading — create a free account

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