开发者

How do I apply a median filter to a UIImage on the iPhone?

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜