检测图像的模糊程度 [英] Detecting how blur an image is

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

问题描述

我想检测图像的模糊程度,可能是模糊扩展。
我找到了一篇有用的论文:

I want to detect how blur an image is, may be It can be called "blur extend". I find an useful paper for this:

http://www.cs.cmu.edu/~htong/pdf/ICME04_tong.pdf

我用OpenCV并完成了本文的所有步骤,但结果与本文的结果不一样?

I use OpenCV and do through all steps from this paper, but the result is not same as result from this paper?

可能是我的程序运行不正常?
或者有人可以给我任何关于检测模糊延伸的建议。

May be my program does not work well? Or someone can give me any advise for detecting "blur extend".

谢谢。

推荐答案

您可以使用下一个算法检测模糊图像:

You can detect a blurring image with using next algorithm:


  1. 将图像转换为灰色格式。

  2. 从灰度图像计算最大绝对二阶导数(对于每一点):

  1. Convert the image into gray format.
  2. Calculate maximal absolut second derivative from the gray image (for every point):

d [x,y ] = max(abs(2 * d [x,y] - d [x,y + 1] -d [x,y-1]),abs(2 * d [x,y] - d [x + 1] ,y] -d [x-1,y]));

d[x,y] = max(abs(2*d[x,y] - d[x,y+1] -d[x,y-1]), abs(2*d[x,y] - d[x+1,y] -d[x-1,y]));

计算此估计图像的直方图(最大绝对二阶导数)。

Calculate histogram of this estimated image (maximal absolut second derivative).

查找此直方图的上分位数(0,999)。

Find upper quantile (0,999) of this histogram.

如果此值小于阈值(约25%来自图像动态范围),然后图像模糊。

If this value less then threshold (about 25% from image dynamic range), then image is blurred.

如果您想要估计模糊值,则执行步骤2-5以缩小图像。

If you want estimate blur value, that perform steps 2-5 for reduced image.

您可以自己编写这些算法,也可以使用 Simd Library

You can write these algorithms on their own or use one from the implementation of Simd Library.


  • Simd :: BgrToGray或Simd :: BgraToGray(步骤1)。

  • Simd :: AbsSecondDerivativeHistogram(步骤2-5)。

  • Simd :: ReduceGray2x2(步骤6)。

这篇关于检测图像的模糊程度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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