I am trying to filter crawled images with their image quality. By 'high quality' I mean high resolution, not aesthetic score or perceptual score.

However I found that some images have very high pixel resolution (e.g. 4000px * 4000px) but their actual quality look like (200*200) image is stretched by 20 times. I would like to measure the level of detail.

From wikipedia I learned spatial resolution is what I am looking for. Two images below are of the same size (the same number of pixels). But the description of spatial resolution sounds ambiguous:

In effect, spatial resolution refers to the number of independent pixel values per unit length.

How do I measure the independence between pixels? What metrics exist? I guess If I run 2D DFT and there is high value in high frequency region, then the image carries more details? Are the images with salt-pepper noise considered to have low spatial-resolution?

enter image description here enter image description here

  • $\begingroup$ Am I right to presume that we cannot assume all these images used the same scaling algorithm, if any? $\endgroup$ – Marcus Müller May 22 '18 at 12:09
  • 1
    $\begingroup$ I think if you scale with any interpolation method like bicubic, pixels are smooth but these are not independent. So I think the definition of spatial resolution can cover that. $\endgroup$ – mq7 May 22 '18 at 13:54
  • $\begingroup$ By the way the question is not specific to scailing. For example, if the photo is captured in low light so contains a lot of noisy pixels, for example every second row/column carries a meaningful information, by definition above, I can say it has low spatial resolution. $\endgroup$ – mq7 May 22 '18 at 13:56
  • $\begingroup$ Can I please ask if this was resolved? $\endgroup$ – A_A Jun 11 '18 at 5:48

If you want to figure out if an image is actually a stretched version of a smaller image, you can probably assess if there is any information lost at the transformation. What you cannot do is assess spatial resolution because you don't really know how much actual space the image covers in the first place.

The idea is this: When you scale-down an image, you throw away some of the information it carries. If you were now to scale-up the scaled-down version of the image, you don't exactly get the original image because that would mean having a way to fill in the information you threw away during the first step. Therefore, the spatial frequency spectrum of a scaled-down->scaled-up image is identical to that of the scaled-down image but interpolated too. That spectrum actually stops at a specific spatial frequency component and from that information you can probably also work out how small this image used to be before it got scaled up.

For example:

This image:

enter image description here

Has this spectrum (notice pixelation):

enter image description here

And this image:

enter image description here

Has this spectrum:

enter image description here

The scaling here is extreme to illustrate the point. We go from 64 pixels in the horizontal direction to 64 pixels blown up to 1024 using cubic interpolation.

Notice how the large image can accommodate many more spatial components until its periphery but that space remains "dark" (i.e. low power at high spatial frequencies).

This is the signature of a stretched image (scaled-down->scaled-up). If the image happens to be simply blurred, then you would still detect less power in the higher frequencies but you would have to come up with a way of discriminating between pictures that are blurred and pictures that genuinely only use less spatial components than what would be expected.

To figure that out, you can integrate the spectrum radially in an attempt to recover the average envelope of the frequency spectrum. In the case of a blurred image, this envelope would tend towards known low pass frequency responses, compared to the spectrum of an image that is genuinely not blurred.

This latter part is a bit more challenging to get right and would have certain limits beyond which you could say confidently that it is a blurred image rather than a small but clear image.

The image that you bring as an example seems to be a simply blurred one. Its spectrum looks like this:

enter image description here

Hope this helps.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.