I have lots of high quality, high resolution black and white raster images of scanned text with a minimal amount of noise, around 6 Gigapixels or 500 pages per document. They use too much disk space for my liking. Is there a tool which can compress raster images using ocr, losslessly?
It would work like this:
- Do word-by-word ocr on input file.
- Create a font that matches the one in the scanned file.
- Put the ocr'd text into a pdf together with this font, creating an image that contains just the ocr'd parts of the original (and is tiny because it's just a font+plain text).
- Do a raster difference of the ocr'd part and the original, then add just the difference to the ocr'd image as a raster overlay.
Because the difference should be small (just some noise and the occasional word or glyph that couldn't be recognized), this should achieve very high compression ratios.