【问题标题】:Is here any way to find out whether an image is blurry or not using Laplacian operator这里有什么方法可以使用拉普拉斯算子找出图像是否模糊
【发布时间】:2018-11-08 18:18:07
【问题描述】:

我正在从事这个项目,我必须在不实际查看图像的情况下自动计算相机拍摄图像的清晰度。我尝试了许多检测方法,但最后我使用 openCV 使用拉普拉斯算子更进一步。

现在,openCV 中的拉普拉斯算子返回图像矩阵。但是,无论图像是否模糊,我都必须根据我的阈值获得布尔输出。

任何相关的链接、算法或 IEEE 论文都会有所帮助。谢谢!

【问题讨论】:

  • 所以您可以/将捕捉多张图像并选择捕捉最清晰图像的设置?
  • 让我们以 Galaxy S6 为例。现在,我必须检查 S6 的对焦性能在一段时间内下降了多少。为此,我必须使用我的程序拍摄几张相同图像的照片,但不是通过我的眼睛手动拍摄。
  • 寻找“感知锐度度量”(PSM),例如来自 yang et al 2006

标签: c++ opencv edge-detection


【解决方案1】:

你会发现很多信息here

如果很有趣,还有一个答案中引用的论文:Analysis of focus measure operators for shape from focus

【讨论】:

    【解决方案2】:

    参考这个https://stackoverflow.com/a/44579247/6302996

    Laplacian(gray, laplacianImage, CV_64F);
    Scalar mean, stddev; // 0:1st channel, 1:2nd channel and 2:3rd channel
    meanStdDev(laplacianImage, mean, stddev, Mat());
    double variance = stddev.val[0] * stddev.val[0];
    
    double threshold = 2900;
    
    if (variance <= threshold) {
        // Blurry
    } else {
        // Not blurry
    }
    

    【讨论】:

      猜你喜欢
      • 2020-06-28
      • 1970-01-01
      • 2014-07-27
      • 1970-01-01
      • 1970-01-01
      • 2019-05-08
      • 1970-01-01
      • 1970-01-01
      • 2015-09-27
      相关资源
      最近更新 更多