image sampling
Sampling is the spatial half of digitizing a picture: taking the continuous pattern of light focused on the sensor and reading off its value at a regular grid of points, one per pixel. The scene is continuous — between any two points there is always another point — but the stored image is finite, so sampling decides which positions get recorded. The spacing of that grid, the sampling rate (samples per unit length, or pixel pitch as its inverse), governs the finest spatial detail the image can possibly hold.
How fine is fine enough is answered precisely by the Nyquist-Shannon sampling theorem. If the incoming image has no spatial frequencies above some maximum f_max (no detail finer than a certain size), then sampling at a rate greater than 2 f_max — the Nyquist rate, at least two samples per cycle of the finest detail — captures the signal exactly, so the continuous image could in principle be reconstructed without error. Sampling more slowly than this undersamples: high frequencies cannot be represented and do not simply vanish, they masquerade as false low frequencies. This is the root cause of aliasing.
The practical consequence is that you must band-limit before you sample. Real scenes contain arbitrarily fine detail (sharp edges, fine textures, distant fences), so a raw sensor would alias; the cure is to blur slightly first, with an anti-aliasing optical low-pass filter or by averaging over each pixel's area, removing frequencies above the Nyquist limit so what remains can be sampled faithfully. The same logic governs every resize and downscale in software: to shrink an image correctly you must low-pass filter then subsample, never just drop pixels. Sampling thus sits at the foundation of why images look the way they do and why naive resizing produces shimmering artifacts.
Downscaling by simply skipping pixels (nearest-neighbor) is undersampling and produces aliasing — jagged diagonals, shimmering thin lines, moire on textures. Always low-pass filter (e.g. area-average or Gaussian blur) before reducing resolution; the same filter-then-subsample rule applies to building image pyramids used by SIFT and CNN preprocessing.