Smoothing Techniques in Image Processing. Prof. PhD. Vasile Gui Polytechnic University of Timisoara . Content. Introduction Brief review of linear operators Linear image smoothing techniques Nonlinear image smoothing techniques . Introduction. Why do we need image smoothing?
An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.Content is provided to you AS IS for your information and personal use only.Download presentation by click this link.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.During download, if you can't get a presentation, the file might be deleted by the publisher.
Brief Review of Linear Operators • Basis vectors are orthogonal • Inner product and energy are conserved • Unitary transform: a rotation in N-dimensional vector space
x2 2 1 x1 Brief Review of Linear Operators • 2D vector space interpretation of a unitary transform
m,n + L pixels m,n+1 Linear Image smoothing techniquesBox filters. Arithmetic mean LL operator • Separable • Can be computed recursively, resulting in roughly 4 operations per pixel
Linear Image smoothing techniquesBinomial filters [Jahne 1995] • Computes a weighted average of pixels in the window • Less blurring, less noise cleaning for the same size • The family of binomial filters can be defined recursively • The coefficients can be found from (1+x)n
Step edge Result of size L box filter Size L binomial L Linear Image smoothing techniquesBinomial and box filters. Edge blurring comparison • Linear filters have to compromise smoothing with edge blurring
f(1) f1 f(2) f2 . . . f(m) . . . Order samples select f(N) fN median Nonlinear image smoothingThe median filter [Pratt 1991] • Block diagram N is odd
Nonlinear image smoothingThe median filter • Nonlinearity median{f1 + f2} median{ f1} + median{ f2}. However: median{ c f} = c median{ f }, median{ c + f} = c + median{ f}. • The filter selects a sample from the window, does not average • Edges are better preserved than with liner filters • Best suited for “salt and pepper” noise
Nonlinear image smoothingThe median filter • Optimality • Grey level plateau plus noise. Minimize sum of absolute differences: • Result: • If 51% of samples are correct and 49% outliers, the median still finds the right level!
Test images Results of 33 pixel median filter Nonlinear image smoothingThe median filter • Caution: points, thin lines and corners are erased by the median filter
Nonlinear image smoothingThe median filter • Implementing the median filter • Sorting needs O(N2) comparisons • Bubble sort • Quick sort • Huang algorithm (based on histogram) • VLSI median
x1 x(1) x2 x(2) x3 x(3) a Min(a,b) x4 x(4) b Max(a,b) x5 x(5) x6 x(6) x7 x(7) Nonlinear image smoothingThe median filter • VLSI median block diagram
Nonlinear image smoothingThe median filter • Color median filter • There is no natural ordering in 3D (RGB) color space • Separate filtering on R,G and B components does not guarantee that the median selects a true sample from the input window • Vector median filter, defined as the sample minimizing the sum of absolute deviations from all the samples • Computing the vector median is very time consuming, although several fast algorithms exist
Nonlinear image smoothingThe weighted median filter • The basic idea is to give higher weight to some samples, according to their position with respect to the center of the window • Each sample is given a weight according to its spatial position in the window. • Weights are defined by a weighting mask • Weighted samples are ordered as usually • The weighted median is the sample in the ordered array such that neither all smaller samples nor all higher samples can cumulate more than 50% of weights. • If weights are integers, they specify how many times a sample is replicated in the ordered array
1 2 1 2 2 3 1 2 1 3 7 8 2 3 7 6 4 6 7 2, 2, 3, 3, 3, 3, 4, 6, 6, 7, 7, 7, 7, 7, 8 Nonlinear image smoothingThe weighted median filter • Numerical example for the weighted median filter
R3 R2 R4 m5 R1 mi = median( Ri ), i =1,2,3,4. Result = median( m1,m2,m3,m4,m5 ) Nonlinear image smoothingThe multi-stage median filter • Better detail preservation
Nonlinear image smoothingRank-order filters (L filters) • Alpha-trimmed mean filter • = (2Q + 1) / N, defines de degree of averaging • = 1 corresponds to arithmetic mean = 1 / N corresponds to the median filter Properties: in between mean and median
reg 2 reg 1 reg 4 reg 3 reg 6 reg 5 reg 8 reg 7 Nonlinear image smoothingSelected area filtering [Nagao 1980] • Kuwahara type filtering • Form regions Ri • Compute mean, mi and variance, Si for each region. • Result = mi : mi < mj for all j different from i, i,e. themean of the most homogeneous region • Matsujama & Nagao
Nonlinear image smoothingConditional mean • Pixels in a neighbourhood are averaged only if they differ from the central pixel by less than a given threshold: L is a spacescale parameter and th is a range scale parameter
Nonlinear image smoothingBilateral filter [Tomasi 1998] • Space and range are treated in a similar way • Space and range similarity is required for the averaged pixels • Tomasi and Manduchi [1998] introduced soft weights to penalize the space and range dissimilarity. s() and r() are space and range similarity functions (Gaussian functions of the Euclidian distance between their arguments).