在Android的图像降噪 [英] image noise reduction in android

查看:1382
本文介绍了在Android的图像降噪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个摄像头应用程序,它允许用户捕获纸币的图像,发送到服务器里,它会被打印出来。

I've written a camera app which allow users to capture image of paper bills, send to server where it'll be printed.

问题: 当我打印的图像,背景是黑色的,由于在拍摄的图像噪声。我想要的是一个干净的白色背景。我试过位图的COM preSS方法保存的JPEG / PNG格式在不同的尺度(1-100),但没有多少有用的图像。我见过camscanner应用程序这样做飞驰,但不知道如何。

Problem: when I print the image, the background is blackish due to noise in captured image. All I want is a clean white background. I've tried Bitmap's compress method to save the image in JPEG/PNG format on different scales (1-100) but not much helpful. I've seen camscanner app doing this fantastically but have no clue how.

任何指针来实现,这将是有帮助的。

Any pointer to achieve this will be helpful.

感谢。

推荐答案

如果该问题是一些随机噪声,也有一些噪声消除过滤器在那里,你可以使用(即中值滤波器或双边滤波器)。

If the issue is some random noise, there are some noise removing filters out there you can use (i.e. median filter or a bilateral filter).

时的形象已经二进制化的(转换成严格的黑色和白色像素)?你会想这样做在此之前的过滤。

Is the image already binarized (converted to strictly black and white pixels)? You'd want to do the filtering before this.

EDIT(后澄清暗灰色):由于背景是暗灰色的我猜的问题就是,它是一种低对比度,因为这将是一个自然的图像,将有变化如何不好对比。我建议使用Sauvola二值化这将分离出的黑色和深灰色为黑色和白色。下面是Sauvola的一些细节,例如结果: http://www.leptonica.com/binarization.html。要运行一些测试,看看这二值化算法将是最好的,你可以找到一个图书馆这里

EDIT(after clarification on dark gray): Since the background is a dark gray I'm guessing the problem is just that it is a low contrast and since it will be a natural image, there will be variation on how bad the contrast is. I suggest using Sauvola binarization for this which will separate out the black and the dark gray to black and white. Here is some detail and example results of Sauvola: http://www.leptonica.com/binarization.html. To run some tests to see which binarization algorithm would be best you can find a library here

这篇关于在Android的图像降噪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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