Image sharpness metric
Asked Answered
S

4

11

Is there some robust metric of image sharpness or bluriness? I have various set of images with different parameters of saturation and captured from different optical systems, and i heed to show user something like "quality" of focusing. For getting most focused image i use metric getted with Sobel-Tenengrad operator(summ of high-contrast pixels), but the problem is that for different objects are quite different range of metric(depends on unknown parameters of image intensity, optical system ) - needed some metric where possible to say that image has bad focus whithout comparing with reference image, like this is "bad" or "good" focused image.

Swagman answered 26/7, 2013 at 17:53 Comment(3)
This question appears to be off-topic because it is about a mathematical/numerical analysis/computer graphics topic. Don't get me wrong, it's interesting, but the underlying problem is actually really hard and still being researched.Technocracy
@Technocracy - Since when is computer graphics off-topic for SO? The help page specifically says that questions about software algorithms are on-topic. I don't believe OP is asking for a theoretical answer, but rather for an algorithm to compute a metric.Jurel
possible duplicate of Calculating image acutanceLocomotive
L
4

You can calculate the accutance of the image by calculating the mean of the Gradient Filter.

Reference this StackOverflow answer to a similar question.

Leavenworth answered 26/7, 2013 at 18:2 Comment(1)
I have to implement this same way before asking, and this is looks like algorithm “mean of Gaussian filteter”: * Calculate gradient Sobel x,y derivative * Get the magnitude image * Get the average(mean) value of magnitude. Result seems to be acceptable, but it vary his value range from image to image.Swagman
W
3

Autofocus is an interesting problem on its own, and so evaluating sharpness across arbitrary images is another level of complexity.

On sharpness evaluation, I suggest this paper from Cornell. Their conclusion was that the variance metric provided the best evaluation of a given image. And it doesn't hurt that it's really easy to calculate!

For creating a consistent metric across different images, you'll need a way to normalize. The metric might be in units of variance per pixel. You could take advantage of the fact that lack of focus provides an upper bound on variance, and so look for clustering at a maximal rate of local variance.

Willed answered 11/7, 2015 at 0:18 Comment(0)
V
3

You need a no-reference sharpness metric, such as:

Vineland answered 22/7, 2015 at 20:47 Comment(0)
O
0

Here's a short paper describing a method for detecting blurredness using a Haar Wavelet Transform

The other answers to this PAQ may also be helpful.

Ostyak answered 11/7, 2015 at 0:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.