Equivalents to OpenCV's erode and dilate in PIL?

Viewed 8086

I want to do some image OCR with PyTesseract, and I've seen that OpenCV's erode and dilate functions are very useful for noise removal pre-processing.

Since PyTesseract already requires PIL/Pillow, I'd like to do the noise removal in PIL, rather than get another library. Is there an equivalent to erode/dilate in PIL? (My research seems to suggest that MaxFilter and MinFilter could be used this way, but it's not fully clear to me if that's really true.)

Thanks!

1 Answers
Related