SolidCoding theme image
OCR to EPUB Script (2023)
script
Web application
A friend recently provided me some text content in image format that is not easily readable on e-ink devices (or even on a desktop really) due to low image resolution and how the image files were organized. I tried scanning these files through Tesseract and EasyOCR, but the outcomes were unusable without some major tweaking involved. I then turned to the Google Vision API, which produced more consistent and more readable output. Using this as a starting point, I wrote a PHP script to feed my source images into the API, clean up the output, and then produce files which could then be ingested into Calibre for conversion to EPUB/mobi. The result was an eBook that was 99% consistent with the source material, although some formatting such as bolding and italics were lost in the transfer.
SolidCoding theme image