Image filtering refers to processing of an input image to produce either a better-looking output image by contrast/sharpness and/or signal-to-noise ratio enhancement. It also includes computing some low-level image features such as edges, corners, or spatial-gradient values that may be used in subsequent image processing.
Usually a RGB image is first converted into the luminance-chrominance (YCrCb) domain. And then we process the luminance (Y) component only, and then convert back to RGB for display. This is because:
- Processing R, G, and B components independently may alter the color balance
- Human visual system is not very sensitive to high frequencies in chrominance components.
Image Smoothing
Image smoothing refers to removing high-frequency details, which yields a softer or somehow blurry image. It is often employed as a pre-processing or an intermediate processing step in many image-processing operations. It is also used for image denoising. Image-smoothing algorithms can be classified as linear shift-invariant (LSI) filters, and nonlinear/adaptive filters.
A low-pass filtered (linear shift invariant low pass filter) image sL(n1, n2) can be computed either in the discrete Fourier transform DFT domain in terms of the filter-frequency response, or in the spatial domain by 2D-convolution summation.
{s_L(n_1, n_2) = \sum_{{i_1, i_2} \in W}}h({i_1, i_2})s(n_1 - i_1, n_2 - i_2)
where h(i1, i2) denotes the impulse response of the filter and W is the filter support. The impulse response must be normalized such that mean intensity of the filtered image remains unchanged
\sum\sum_{{i_1,i_2} \in W}h(i_1, i_2) = 1
Image Re-Sampling
Image re-sampling, also known as decimation and interpolation, requires evaluation of image intensity at sub-pixel locations. It appears in many image-processing problems including
- Image scaling
- Color de-mosaicking
- Multi-resolution representations
- Sub-pixel motion estimation
- Motion-compensated filtering
- Image warping
- Synthetic view synthesis.
The filters used for image decimation and interpolation have a significant effect on the quality of the results. Most image re-sampling filters are separable. Hence 1D filters are applied independently in n1 and n2 directions.
Interpolation refers to the process of up-sampling followed by appropriate filtering, while decimation refers to appropriate filtering followed by down-sampling.