Image Preprocessing before OCR process

2019-03-22 03:11发布

My current project involves transcribing texts in pdf into text files, and I first tried putting the image file directly into OCR program (tesseract) and it didnt' do that well. The original image files are old news papers, basically, and have some background noises, which I am sure tesseract has problem with. So I am trying to use some image preprocessing before feeding it into tesseract. Is there any suggestion for open source image preprocessing engine that fits well to this situation??? And instructions on how to use it would be even more appreciated !

3条回答
唯我独甜
2楼-- · 2019-03-22 03:34

Check out ScanTailor. It has pretty impressive pre-processing functionality and it is open source.

查看更多
祖国的老花朵
3楼-- · 2019-03-22 03:40

Like @karlphillip mentioned, I highly doubt there's a readily available preprocessing engine for your purposes as the preprocessing technique vary greatly with the desired result.

Some common approaches to clearing up the text in noisy images include: 1. Adaptive thresholding (Sauvola or Niblack binarization) 2. Applying a median filter of a size slightly larger than the text to get a background image, then subtract out the background from the original image (to remove the larger noise like creases, stains, handwritten notes, etc.).

OpenCV has implementations of these filters/binarization methods. If you have access to published literature there's quite a bit of work on binarization of noisy documents.

查看更多
叛逆
4楼-- · 2019-03-22 03:47

I never heard of an "image preprocessing engine" for that purpose, but you can take a look at OpenCV (Open Source Computer Vision Library) and implement your own "pre-processing engine". OpenCV is a computer vision library that offers many features to perform image processing.

One interesting thing you might want test as a preprocessing step is apply a threshold to the image to remove noises and stuff. Anyway, I've talked about this kind of stuff in this thread.

查看更多
登录 后发表回答