2
$\begingroup$

In digital image processing, I need to understand what does image resizing do? Does it only change the dimensions of the image, for example, from 256×256 to 128×128 with the same pixel spacing (the same dpi)? Or does it change the dpi or pixel spacing in an image? If I need to increase the size of the image and also increase its dpi, how can I do this?

$\endgroup$
2
$\begingroup$

In digital image processing, an image resizing changes only the array size (dimensions) of the image. It does not care about dpi. It just upsamples or downsamples the image array.

DPI (Dot Per Inch) is considered only when the actual physical size of the displayed (or printed) image is of concern.

When you display a scaled image on the same physical monitor, then the apparent dpi of the image content will be changing too. This is especially important on text processing with font rendering.

Some programs try to keep image physical display size the same, while scaling them or when displayed on different monitors, by incorporating a dpi parameter to be used as well.

[edit for answer below] In those examples from Gonzalez's book, images are considered with their physical sizes when displayed (or printed). Assuming square pixels, DPI of a physical display device is computed by $$ \text{DPI} = \frac{ \text{ number of horizontal pixels on the monitor}}{ \text{ horizontal length (in inches) of the monitor}} $$

for example for a typical 15.6 inches, FHD (1920 x 1080 ), 16:9 aspect ratio laptop, the DPI will be $$ \text{DPI} = \frac{ 1920 \times \sqrt{16^2 + 9^2}}{15.6 \times 16} = 141.212 $$

That's the DPI of the monitor.

Physical size of a displayed image with a array size of $M \times N$ is given by $$ \text{H} = \frac{ M }{ \text{DPI}} $$ horizontally and

$$ \text{W} = \frac{ N }{ \text{DPI}} $$ vertically in inches...

For amonitor with a given DPI, an image with smaller array size $M,N$ will display smaller on the screen. If you upsample (aka interpolate, or scale) the image array from $M,n$ to, say, $3M, 3N$, then the displayed image size will also be tripled.

And finally; interpolation of an image (or any digital data) means computing the sigal values that's physically in between its existing samples. In that respect you are decreasing the pixel distance when you interpolate. However, interpolation will not give you new data; it will only make exsting data smoother. That's exacty why you cannot get authentic FHD video simply by interpolating from an SD original source...

$\endgroup$
1
  • $\begingroup$ In the reference Digital Image Processing (third edition) authored by Rafael C. Gonzalez and Richard E. Woods, I have read the following paragraph in subsection 2.4.3 Spatial and Intensity Resolution: Figure 2.20 shows the effect of spatial resolution in an image. The images in Fig. 2.20 (a) through (d) are shown in 1250, 300, 150, and 72 dpi, respectively. Naturally the lower resolution images are smaller than the original. For example, the original image is of size 3692 x 2812 pixels, but the 72 dpi image is an array of size 213 x 162. In order to facilitate comparisons, all the sma $\endgroup$ – fatma.diab Dec 13 '19 at 19:31

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.