How to easy process images previous to OCR? #1674
Unanswered
Disonantemus
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
I have many documents with images that contain raster images with useful information (like many kinds of charts: organizational, flow, statistics, etc), but images are very different, with many colors/sizes/quality, that get bad results with OCR.
Workaround
Right now, I do:
pdfimages -all in.pdf _imagemagick, Example: remove all colors but black (text color) very useful to clean charts/boxes with colors/textures that don't get OCRed):magick in.png -alpha remove -fill white -fuzz 70% +opaque "#000000" -colorspace gray out.pngocrmypdfI do get a lot better OCR from that (better than use
ocrmypdfflags process images).Alternative
I know is possible to do a plugin, because #923 , but I don't know how to do that. I'm not a programmer.
Question
There is an easy way to process image(s) inside a PDF with
imagemagick(CLI, no python) to manual improve OCR in hard cases?All reactions