Comic Translator
Python CLI tool for speech bubble extraction, dominant-color text cleaning, and automated dialogue typesetting.
Vertical Concatenation
Extracts chapter zip files and stitches image strips vertically using OpenCV vconcat for continuous processing.
Overview
A Python CLI tool built to automate comic and manga translation workflows. It stitches multi-page chapters, extracts text boundaries with PaddleOCR, expands mask regions with OpenCV morphological dilation, clears original lettering using dominant perimeter color sampling, and typesets translated lines using Pillow font metrics.
Key Features
- Vertical chapter concatenation for multi-page images using OpenCV
- Speech bubble boundary detection using PaddleOCR and morphological dilation
- Dominant-color text removal to cleanly erase text on non-white bubble backgrounds
- Dynamic font sizing and typesetting using Pillow font metrics
- Command-line workflow for batch chapter translation
Outcomes
How It Works
Page Stitching
Combines individual image cuts into a continuous strip using cv2.vconcat.
Bubble Detection & OCR
Finds text boundaries with PaddleOCR and dilates coordinates with cv2.dilate to encapsulate speech bubble areas.
Dominant-Color Inpainting
Samples background color around text boxes to clear original lettering without leaving white patches.
Translation & Typesetting
Translates dialogue and renders wrapped text cleanly into the cleared bubble areas using Pillow.