Practical 2: Impact of Sampling Rate on Spatial Resolution

Open In Colab Run this practical in Google Colab

1. Aim

Objective

To evaluate the relationship between the sampling rate (N) and spatial resolution in digital images.

2. Description / Theory
Problem Statement: Spatial resolution represents the size of the smallest perceptible detail in an image and is fundamentally dependent on the sampling rate. A decrease in the number of samples (N) results in a loss of geometric detail. In this experiment, you will simulate progressive spatial resolution reduction and analyze the resulting artifacts.
3. Code

Part 1: Progressive Downsampling

The image is resized to a 1024x1024 baseline, then progressively halved 5 times using cv2.INTER_AREA interpolation: 1024 → 512 → 256 → 128 → 64 → 32.

Part 2: Comparison Plot

View all resolution levels in a single comparison figure.

Part 3: Quality Loss Visualization

Each downsampled image is resized back to 1024x1024 to reveal the quality degradation at each level.

4. Output 5. Analysis / Conclusion

Analysis Questions

  1. Artifact Identification: At which resolution (N) do "jagged lines" (aliasing) become visible to the eye? Explain how this correlates to the sampling rate.
  2. Sensitivity Analysis: Theory suggests spatial resolution is more sensitive to shape variations than lighting variations. Compare the detail in textured areas vs. smooth areas; which loses perceptible detail first?
  3. DPI Correlation: If the physical size of the image remains constant while the pixel count is halved, how does this affect the Dots Per Inch (DPI)? Relate this to the "blocky" appearance.