Computer Vision – Enhancement(Part II) Hanyang University Jong-Il Park
Department of Computer Science and Engineering, Hanyang University Local Enhancement Global enhancement The same operation for all pixels Local enhancement Different operation for each pixel According to the statistics of local support
Department of Computer Science and Engineering, Hanyang University Local Histogram Equalization Using a fixed window at each point Computationally expensive Histogram equalization at each point
Department of Computer Science and Engineering, Hanyang University Use of statistics of local support Eg. m E Enhanced image Original image
Department of Computer Science and Engineering, Hanyang University Spatial Operations Spatial averaging and spatial LPF for noise smoothing Input image * output Spatial mask ( 3 3, 5 5, )
Department of Computer Science and Engineering, Hanyang University Spatial Mask
Department of Computer Science and Engineering, Hanyang University Spatial Averaging Mean-filtering Noise reduction
Department of Computer Science and Engineering, Hanyang University Spatial Averaging Mask Spatial averaging masks a(k,l) Disadvantage : blurring
Department of Computer Science and Engineering, Hanyang University Effect of window size
Department of Computer Science and Engineering, Hanyang University Eg. Spatial Averaging(1)
Department of Computer Science and Engineering, Hanyang University Eg. Spatial Averaging(2) Original image Averaging 후의 image
Department of Computer Science and Engineering, Hanyang University Cf. Multi-image averaging
Department of Computer Science and Engineering, Hanyang University Spatial Operations - Filtering Parametric Low Pass Filter but to preserve the mean
Department of Computer Science and Engineering, Hanyang University Spatial LPF, BPF, HPF Spatial averaging LPF + + (a) Spatial low-pass filter(b) Spatial high-pass filter (c) Spatial band-pass filter
Department of Computer Science and Engineering, Hanyang University Original image Lowpass Filter 된 후의 image Eg. Spatial LPF
Department of Computer Science and Engineering, Hanyang University Spatial High-Pass Filtering
Department of Computer Science and Engineering, Hanyang University Original image Highpass filtered image Eg. Spatial HPF
Department of Computer Science and Engineering, Hanyang University Original imageLowpass Filter(Short Term) =A Lowpass Filter(Long Term) =B Bandpass Filter 된 후의 Image =B-A Spatial Band-Pass Filtering
Department of Computer Science and Engineering, Hanyang University Denoising by LPF Noisy!Blurred! Trade-off?
Department of Computer Science and Engineering, Hanyang University Directional Smoothing to protect the edges from blurring while smoothing l k
Department of Computer Science and Engineering, Hanyang University Original imageLowpass Filter ( Long Term ) Direc. Smoothing ( 대각선 ) Direc. Smoothing ( 수 직 ) Eg. Directional Smoothing
Department of Computer Science and Engineering, Hanyang University Median Filtering Median Filter Properties nonlinear filter Example
Department of Computer Science and Engineering, Hanyang University Eg. 1D Median Filtering
Department of Computer Science and Engineering, Hanyang University Discussion – Median filter 1) median filter preserve discontinuities in a step function 2) smooth a few pixels whose values differ significantly from the surrounding, without affecting the other pixels. 3) pulse function, whose width is less than one half the filter length, are suppressed
Department of Computer Science and Engineering, Hanyang University 2D Median Filtering Original Image Filtered Image Filter
Department of Computer Science and Engineering, Hanyang University Eg. Median Filtering Original 7x7 Median filtered image Salt-and-pepper noise(=impulsive noise) Excellent performance!
Department of Computer Science and Engineering, Hanyang University Eg. Median Filter – Impulsive Noise
Department of Computer Science and Engineering, Hanyang University Eg. Median Filter – Impulsive Noise
Department of Computer Science and Engineering, Hanyang University Eg. Median Filter – Gaussian Noise Moderate performance
Department of Computer Science and Engineering, Hanyang University Various patterns for median filter Neighborhood patterns used for median filtering
Department of Computer Science and Engineering, Hanyang University Eg. Median filter – Square pattern Original image 10% black, 10% white Median filtering using 3 by 3 square region Median filtering using 5 by 5 square region
Department of Computer Science and Engineering, Hanyang University Eg. Median filter – Octagon pattern Original image 5 by 5 octagonal median filter
Department of Computer Science and Engineering, Hanyang University Eg. Median filter – Reconstruction Original image Median filtering and color compensation
Department of Computer Science and Engineering, Hanyang University Sharpening Images Emphasis of high-frequency components Usually exploiting 1st order derivative and 2 nd order derivatives 1D derivatives 1 st order derivative: 2 nd order derivative:
Department of Computer Science and Engineering, Hanyang University Eg. 1st & 2nd order derivatives
Department of Computer Science and Engineering, Hanyang University Observation on derivatives 2 nd order derivative Thinner edges Stronger response to fine details Weaker response to a gray-level step Double response at step changes Intensity of response: point > line > step The 2 nd order derivative is better suited than the 1 st order derivative for image enhancement.
Department of Computer Science and Engineering, Hanyang University Laplacian Operator – Derivation The simplest isotropic derivative operator
Department of Computer Science and Engineering, Hanyang University Laplacian Operator
Department of Computer Science and Engineering, Hanyang University Sharpening by Laplacian operator
Department of Computer Science and Engineering, Hanyang University Eg. Sharpening Original SEM image Laplacian operator Subtraction of the Laplacian from the original Original image Laplacian operator Subtraction of the Laplacian from the original
Department of Computer Science and Engineering, Hanyang University Composite Laplacian mask
Department of Computer Science and Engineering, Hanyang University Signal Low-pass High-pass (1) (2) (3) (1)+ (3) Unsharp masking and Crispening
Department of Computer Science and Engineering, Hanyang University Unsharp mask application Original image Processed image
Department of Computer Science and Engineering, Hanyang University High-boost filtering Let g(n 1, n 2 ) = u(n 1, n 2 ) - u L (n 1, n 2 ) v(n 1, n 2 ) = u(n 1, n 2 ) + k g(n 1, n 2 ) k=1: Unsharp Masking Crispening an image k>1: High-boost filtering edge or line details to be emphasized
Department of Computer Science and Engineering, Hanyang University Eg. High-boost filtering
Department of Computer Science and Engineering, Hanyang University Zoom(1:2 magnification) revisited Nearest neighbor=Replication = zero - order hold column, row zero-padding
Department of Computer Science and Engineering, Hanyang University Zoom revisited(cont.) Linear Interpolation : first - order hold