While preparing some images for OCR, I usually discard those with low DPI, but as this happens often I thought to try some image processing and on suggestion (morphological operations) I tried ndimage.morph with idea to play around binary_dilation
Images were G4 TIFFs which PIL/MPL can't decode, so I convert to 1bit PNG which I normalized after to 0 and 1.
On sample img I applied:
ndi.morphology.binary_dilation(img).astype(img.dtype)
and
ndi.morphology.binary_erosion(img).astype(img.dtype)
I attached result images, and wanted to ask two question:
1. Is this result correct? From what I read today seems like what dilation does is erosion and vice versa, but I probably overlooked something
2. Does someone maybe know of better approach for enhancing original sample for OCR (except thresholding, for which I'm aware)?
TIA