730 likes | 832 Views
Image Enhancement. Antal Nagy Department of Image Processing and Computer Graphics University of Szeged. Syllabus. Human perception Image degradation Convolution, Furier Transform Noise Image operations Frequency filters Spatial filtering Inverse filtering Wiener filtering.
E N D
Image Enhancement Antal Nagy Department of Image Processing and Computer Graphics University of Szeged 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Syllabus • Human perception • Image degradation • Convolution, Furier Transform • Noise • Image operations • Frequency filters • Spatial filtering • Inverse filtering • Wiener filtering 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Image Enhancement • Aim • to improve the perception of information images • for human viewers • to provide ‘better’ input • for other automated image processing techniques 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Human perception • No general theory for determining what is good image enhancement • If it looks good, it is good!? 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Mach Band Effect 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Optical Dissillusion 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Photoshopretouch • http://www.youtube.com/watch?v=_d_l5nsnIvM 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Pre-processing tool • Focus • Noise reduction techniques • Quantitative measures can determine which techniques are most appropriate • How does it improve e.g. the result of the next automated image processing step? • E.g. image segmentation 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Image acquisition • The first stage of any vision system • Can we do it in perfect way? • Sometimes yes • Industrial applications • Ideal background • Ideal lighting • Faultless camera • Sometimes not • Industrial applications • Despite of supreme conditions we got degraded image • Accumulation of the faults of the electrical components • Physical phenomena • E.t.c. • Medical image acqusition 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Image Degradation • Non-linear mapping • E.g., non-linear sensitivity, image of the straight line is not straight e.t.c. • Blurring • Image of a point is blob • Moving during the image acquisition • Probabilistic noise 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Image Degradation/RestorationModel Spatial domain Frequency domain 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Convolution Theorem • Multiplication point by point 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
ExampleforConvolutionTheorem Convolution = * Inverse Fourier transf. Fourier transf. · = Multiplication 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Spatial Domain - Convolution Definition 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Properties of theConvolution 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
x x x ExampleforConvolution - Smoothing 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
FrequencyAnalysis • Even functions that are not periodic can be expressed as the integrals of sines and/or cosines multiplied by a weighting function. • The formulation in this case is the Fourier transform. ∑ = 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Jean-Baptiste Joseph Fourier1768-1830 Taught mathematics in Paris Eventually traveled to Egypt with Napoleon to become the secretary of the Institute of Egypt After fall of Napoleon worked at Bureau of Statistics Elected to National Academy of Sciences in 1817 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Fourier Transform (1D) (continous) (inverstransform) base-functions 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Fourier Transform (2D) (inverstransform) base-functions 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
BaseFunctions u=-2, v=2 u=-1, v=2 u=0, v=2 u=1, v=2 u=2, v=2 u=-2, v=1 u=-1, v=1 u=0, v=1 u=1, v=1 u=2, v=1 u u=0, v=0 u=-2, v=0 u=-1, v=0 u=1, v=0 u=2, v=0 wavelength: u=-2, v=-1 u=-1, v=-1 u=0, v=-1 u=1, v=-1 u=2, v=-1 u=-2, v=-2 u=-1, v=-2 u=0, v=-2 u=1, v=-2 u=2, v=-2 v 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Properties of the Fourier Transform • F(0,0) -value is by far the largest component of the image, • Other frequency components are usually much smaller, • The magnitude of F(X,Y) decreases quickly • Instead of displaying the |F(u,v)| we displaylog( 1 + |F(u,v)| )real function usually 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Examplefor Fourier Transform y u v x 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Properties of the Fourier Transform • The 2D Fourier transform can be separated • The edges on the image appears as point series in perpendicular direction in Fourier transform of the image and vice versa. 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Properties of the Fourier Transform Image-space Frequencyspace original rotation linearity shift scale 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Noiseonly • Noise unknown subtraction not possible • Periodic noise • N(u,v) can be estimated from G(u,v) 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
SomeImportantNoiseModels • Exponential and gamma • Laser imaging • Impulse • Faulty switching • Uniform density • Practical situations 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary • Gaussian • In an image due to factors • Electronic circuit noise • Sensor noise due to • poor illumination • High temperature • Rayleigh • Range imaging
ProbabilityDensityFunctions 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
ProbabilityDensityFunctions 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
ProbabilityDensityFunctions 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Examples 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Examples 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
PeriodicNoise • Electrical and electromechanical interference • Spatial dependent noise • Can be reduced via frequency domain filtering • Pair of impulses 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Image Operation T: A=[a(i,j)] → B=[b(i,j)] b(i,j)=T{a(i,j), S(i,j), i, j} enviroment position intensity 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Classification of the Image Operations • Global:b(i,j)=T{A} (S(i,j)=A)(e.g. Fourier-transformation) • Local: T{a(i,j), S} given size of S and independent from the position (e.g. convolution with a mask) • Local, adaptive:T{a(i,j), S(i,j), i, j} the size of S(i,j) is independent from the size of image (e.g. adaptive thresholding) • Point operation: T{a(i,j)} (e.g. gamma-correction, histogram-equalization) 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Frequency Filtering – SmoothingIdealLowpass Filter D0: cutoff frequency All frequencies less thanD0 will be passed, Other frequencies will be filtered out. Bluring and ringing properties Scope: noise filtering 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Example of IdealLowPass Filter F . Input image F-1 Frequency-mask 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Example of IdealLowPass Filter Cutoff frequencies 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Frequency Filtering – SmoothingButterworthLowpass Filter • n: order of the filter • Properties: • Smooth transition in blurring • No ring effect (continouos filter) • Smoothed edges 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Example of Butterworth Filter Cutofffrequencies 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Frequency Filtering – SmoothingGaussian Lowpass Filter 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Example of Gaussian Lowpass Filter Cutofffrequencies 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Low and Highpass Filter Pairs 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Example of IdealHighpass Filter 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
SelectiveFiltering • Bandreject and Bandpass Filters • Notch Filters • Rejects or passes frequencies in a predefined neighborhood about the frequency rectangle • Zero-phase-shift filters • Symmetric about the origin • (u0,v0) (-u0,-v0) • Product of highpass filters whose centers have been translated to the centers of the notches. 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Example of IdealBandreject Filter noisyimage frequencyimage 0 frequencymask filteredimage 1 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
Example of Notch Filter 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
SpatialFiltering • Mean Filter where g input image, S(x,y)neighborhood of (s,t) point, mnnumber of pixels in neighborhood. 3x3 neighborhood 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
MeanFilteringbyConvolution 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary
FilteringwithWeightedAverage of Neighborhood • Averaging • same weight for every pixels in neighborhood, • Weighted average • weights for pixels in the neighborhood (generally decreasing with the distance). • The sum of the Noise Filtering/smoothing masks elements is 1! 17th SSIP 2009, 2 - 11 July, Debrecen, Hungary