iPhone中的imagemagick单色转换 [英] imagemagick monochrome convert in iPhone

查看:212
本文介绍了iPhone中的imagemagick单色转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在iPhone中有一个我需要转换为单色的图像。这些图像是文档的照片,我需要尽可能干净的转换。

I have an image in the iPhone that I need to convert to monochrome. The images are photographs of documents and I need as clean a conversion as I can get.

我的第一个解决方案做了一个像素与像素比较的像素,虽然它做了转换正常,阴影可以压倒图像。

My first solution did a pixel for pixel compare with a threshold, and while it does the conversion fine, shadows can overwhelm the image.

我的下一个试验是使用 imagemagick ,希望我可以应用各种降噪/去噪滤镜来清理图像,这就是这家伙正在做

My next trial is to use imagemagick, hoping that there are various noise reduction/despeckle filters that I can apply to clean the image up, which is what this guy is doing.

我在iPhone上运行 imagemagick 并且可以毫无问题地应用 MagickWand 方法。我的问题是,我不认为有一个内置会做我想要的。所以我转向 ConvertImageCommand ,但我对如何实际使用它感到很遗憾。

I have imagemagick running on the iPhone and can apply "MagickWand" methods with no problem. My issue is that I don't think there is one built in that will do what I want. So I turn to the ConvertImageCommand but am lost on how to actually use it.

所以我正在寻找任何指导或示例。谢谢!

So I am looking for any guidance or examples. Thanks!

推荐答案

事实证明我一直在寻找的是自适应阈值处理

It turns out what I've been looking for is Adaptive Thresholding in my conversion to monochrome.

Chris Greening 创建了一个图像处理库可以很好地处理这个问题。

Chris Greening has created an image processing library that handles this quite well.

所以不需要imagemagick。

So no imagemagick needed.

这篇关于iPhone中的imagemagick单色转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆