I would like to improve my OCR accuracy (I'm using the Tesseract OCR engine) by using a median fi开发者_运维问答lter on an image before performing OCR on it. How would I apply a median filter to a UIImage instance?
I'm not quite sure what exactly you want to achieve... but with ImageMagick commandline you would apply a median filter like this:
convert a.jpg -median 0 b.jpg
convert a.jpg -median 1x1 b.png
convert a.tif -median 2x2 b.tif
[...]
convert a.jpg -median 5x3 b.jpg
精彩评论