Image enhancement Last update Heejune Ahn, SeoulTech
Outline Purpose of image enhancment Target Pixel, neighbor hood, filter Linear Filtering Noise Reduction Filters Edge Detection Filters Edge Enhancement Filters
1. Image enhancement Purpose clarify the information of image depends upon what to extract Methods (spatial-domain) filtering: linear or non linear Freq-domain processing (in Ch5) Info 1 Info 2 Info 3.. Noise Info 1 Info 2 Info 3.. Noise Enha ncem ent original image enhanced image By Human Or Machine Info 1
2. Target, Neighborhood, Filter Target pixel the pixel for process/interest Connectivity 4 connectivity: N, W, E, S 8 connectivity NB (Neighborhood) region of (i +/-k, j+/-k), 0<= k <= floor(N/2) NB operation function(NB of (x,y)) nfilter(Image, range, filterfunc) In MATLAB Note: function handle: e.g. func max(x[:])
3. Linear Filter and Filter Kernel Step align center of mask and target pixel Calculate the weighted sum Assign it to target pixel mask (kernel) = matrix of weights center of mask target pixel
In convolution notation or Adaptive filtering Kernel changes depending on the environments
Image boundary No pixels in NB Solutions Leave unchanged Clip image or not Use only available pixels Fill in missing pixels (e.g. replicates) Nonlinear spatial filter Can in convolution expr. Cannot in convolution expr. E.g.) ordering, sorting, etc
4. Filter for Noise Reduction Noise type Salt-pepper, Gaussian Noise simulation For testing, since we cannot real noise easily. imnoise(I, type, param) in MATLAB E.g. (‘salt & pepper’, %), (‘gaussian’, variance)
Mean-filter Kernel: Characteristics Smoothing (low pass), maintaining same mean value Kernel size : as large, blurring (loss of details) Noise removal perform good for Gaussian noise, not good for S&P noise Median-Filter Kernel = median (NB) Characteristics Preserve sharp edge, remove isolated values
Noise removal: ok for Gaussian, good for S&P. Heavy computation: ordering/sorting at every pixel Rank-filter Generalized median filter Kernel = rank_n(NB of pixel(x,y)) Special type: max, min filter Conservative filter I(i) p(i) I(i) o.w.
Gaussian Filter Kernel STD: degree of smoothing Similar to mean filter (LPF) Noise reduction before edge detection Mathematical benefit Gaussian func. Gaussian func. F
5. Edge Detection Filter Derivate-filters for discontinuity detection cf) mean/smoothing filters are integration filters Types : 1 st order, 2 nd order different objects Discontinuity of pixel values in boundary edges
Complete smooth region: 0 Computational characteristics Linear operators: kernel implementation LoG filter Laplacian with Gaussian filter, very popular in feature extraction (e.g SIFT) Not ‘log’arithmic
First order Edgedetector
Computational properties Separable Filters 2D Fillter O(N 2 ) 1D Fillter O(N) 1D Fillter O(N) O(2N)
2 nd order Edge Detector: Laplacian detect of change of gradient Boundary at zero crossing Sharp edge than 1 st order detector
Comparisons of edge detectors
Kernel Reduction of Noise sensitivity Integrated with Gaussian filter : LoG In MATLAB edge(Img, ‘zerocross’, [], filer) Gaussian (STD) Laplacian LoG
6. Edge enhancement Visual enhancement of boundary For human perception Methods Laplacian edge sharpening Unsharp mask
example