Is here any way to find out whether an image is blurry or not using Laplacian operator

对着背影说爱祢 提交于 2020-04-12 06:04:17

问题


I am working on this project where I have to automate the sharpness calculation of an camera taken image without actually looking a the image. I have tried many detection methods, but finally I am going further with Laplacian operator using openCV.

Now, the laplacian operator in the openCV returns the image matrix. But, I have to get boolean output whether the image is blurry or not depending upon my threshold.

Any link, algorithm or IEEE paper for the same would be helpful. Thanks!


回答1:


You will find a lot of infos here.

Also the paper cited in one of the answers if quite interesting: Analysis of focus measure operators for shape from focus




回答2:


Refer this 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
}


来源:https://stackoverflow.com/questions/35768416/is-here-any-way-to-find-out-whether-an-image-is-blurry-or-not-using-laplacian-op

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!