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

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

问题描述

我想检测图像的模糊程度,可能是模糊扩展". 我为此找到了有用的论文

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

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

我使用OpenCV并实现了本文中的所有步骤,但是结果与本文中的结果不同.

I used OpenCV and implemented all steps from this paper, but the result is not same as result from this paper.

有人可以给我一些检测模糊扩展"的建议吗?

Can someone 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 the maximal absolute 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]));

  • 计算该估计图像的直方图(最大绝对二阶导数).

  • Calculate the histogram of this estimated image (maximal absolute second derivative).

    找到该直方图的上分位数(0,999).

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

    如果该值小于阈值(约为图像动态范围的25%),则图像模糊.

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

    如果要估计模糊值,请执行步骤2-5以缩小图像.

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

    您可以自己编写这些算法,也可以使用 Simd库(免责声明:我是作者).

    You can write these algorithms on their own or use one from the implementation of Simd Library (disclaimer: I'm the author).

    • Simd::BgrToGraySimd::BgraToGray(用于步骤1).
    • Simd::AbsSecondDerivativeHistogram(用于步骤2-5).
    • Simd::ReduceGray2x2(用于第6步).
    • Simd::BgrToGray or Simd::BgraToGray (for step 1).
    • Simd::AbsSecondDerivativeHistogram (for steps 2-5).
    • Simd::ReduceGray2x2 (for step 6).

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

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