2

I've noticed that in some devices without true optical focus control, (Blackberries, Android phones, etc), there's a built-in digital auto-focus mechanism.

I suppouse that this mechanism is fully implemented in software, applying an image "sharping" algorithm to the images feed by the camera)*.

Is there an algorithm (or even an open source library in Java or C) so that I can apply it to an image after it has been captured?

Thanks in advance.

*UPDATE: Seems that what I'm looking for is not actually auto-focus, since it involves detecting the best focus level and a mean to change it via API. What I need is an algorithm that given a blurred input image, produces an output image with better definition.

4

1 回答 1

1

看来你是关于反卷积。比如说,我们有卷积 g(x)a = h,其中 g 是原始图像,a - 相机光圈和 h - 感测(“模糊”)图像,(x) - 卷积操作。

反卷积是用已知的 A 和 H 计算 G,并且可以通过多种方式完成。

一个是基于 Fg(i) * Fa(i) = Fh(i) 的事实,其中 F 是傅立叶变换。显然 Fg(i) = Fh(i) / Fa(i)。

在实践中,反卷积极大地增加了噪声,因此需要使用噪声抑制算法。

于 2011-11-14T22:54:50.467 回答