![](https://secure.gravatar.com/avatar/b8db648ce5b0b58a7dda6eab71e5a98f.jpg?s=120&d=mm&r=g)
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 [image: Inline image 1]