开发者

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

开发者 https://www.devze.com 2022-12-28 03:18 出处:网络
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 UII

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

精彩评论

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