1
$\begingroup$

Doing a machine learning computer vision project, and I am a bit unsure of the difference between image resolution and dimensions is, and how I should refer to them in writing. The images in my dataset are rectangular, and I am resizing them using cv2.resize to reduce training time and load.

I saw in some sources that image resolution can be measured as PPI or DPI, whereas in other areas I saw that 1980x1080 can be referred to as a "resolution". Is 1980x1080 resolution or image dimensions, and how can image resolution be defined more broadly?

$\endgroup$

2 Answers 2

2
$\begingroup$

The two terms, "image resolution" and "image dimensions", are often used interchangeably in colloquial speech, but they absolutely have distinct technical definitions, especially in the context of digital imaging and machine learning.

Image Dimensions refers to the number of pixels along the width and height of an image. When we say an image is 1980x1080, these are the image's dimensions. It means the image is 1980 pixels wide and 1080 pixels high.

In a digital context, resolution can refer to the density of pixels in an image. It's often measured in PPI (Pixels Per Inch) or DPI (Dots Per Inch). Higher PPI/DPI values mean more detail can be represented in the same physical space. However, in many digital contexts, "resolution" is also used to refer to the total number of pixels in an image (i.e., the dimensions), which can be confusing.

In your contect (ML and CV), when we resize images, we are generally changing the image dimensions, reducing the total number of pixels in the image. The concept of PPI/DPI is less relevant here because we're typically not concerned with how the image will be physically displayed or printed.

A major source of this confusion comes from laptop/monitor marketing. 1920×1080 is the FHD (Full High Definition) resolution and that was/is the branding that a lot of laptops and monitors were sold with. Similarly, for video playback we say so and so resolution but it is not entirely correct since the bitrate can drastically change the quality of a certain resolution.

To avoid confusion, when writing about your work, it's best to use "image dimensions" when you're talking about the number of pixels along the width and height of the image, and "resolution" when you're discussing the level of detail in the image, which could be affected by both the dimension and the pixel density (PPI/DPI in physical display contexts). If you're using "resolution" to refer to dimensions (as is often done), just be sure to clarify what you mean.

$\endgroup$
2
$\begingroup$

The term “resolution” is much, much older than digital imaging, and was first used when talking about microscopes.

Resolution is a microscope’s ability to distinguish separate objects. A resolution of 1 micron means you can tell two little dots 1 micron apart are actually two little dots, not one. Things smaller than the resolution are not resolvable.

I use the term mostly the same way in digital imaging. If you take a digital image of what you see through that 1 micron resolution microscope, and the image has sufficiently small pixels, the resulting digital image will have a 1 micron resolution. If it has smaller pixels than strictly needed to resolve the 1 micron features, you will not magically see more detail, because the resolution is limited by the optics. If it has larger pixels, then it will not sample the image correctly, leading to aliasing, and a lower resolution digital image.

So, the resolution of a digital image is given both by the size of the pixels (i.e. the pixel density, or the number of pixels per unit area) and by the content of the image. Interpolating an image to increase the pixel density cannot increase the resolution, it cannot elucidate more details. We call this empty magnification.

But indeed many people use “resolution” to just refer to the pixel density and/or to the number of pixels in the image. The pixel density is the upper limit for how small a detail you can represent in an image, so it makes sense to refer to that as “resolution”. But number of pixels, that makes no sense.

Back in the early 1990’s (or maybe late 1980’s?), when monitors all had a 14 inch diagonal, manufactures competed on how many pixels they could cram into that surface. They made their pixels smaller, and smaller pixels means higher resolution. But they didn’t mention the pixel size in advertisement, they talked about the number of pixels. I think this is how “resolution” became associated with “number of pixels”.

$\endgroup$
1
  • 1
    $\begingroup$ Note that if you are measuring resolution in real terms (i.e., microns or milliradians or whatever), then at some point when you sub-sample an image (i.e., to make training easier) then when your pixel size gets to be half the size or larger than the optics' blur spot you start to lose resolution in real space because of aliasing. $\endgroup$
    – TimWescott
    Commented Sep 23, 2023 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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