问题
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