Image RestorationWhat is Image RestorationImage Degradation ModelNoise ModelsNoise Removal Restoration MethodMean FiltersContra-Harmonic FiltersMedian FilterLSI Degradation ModelsTurbulence Blur ExamplesMotion BlurInverse FilterWiener FilteringDerivation of Wiener FiltersConstrained Least Square (CLS) FilterIntuitive Interpretation of CLSSolution and Iterative AlgorithmCLS Demonstration© 2002-2003 by Yu Hen Hu1ECE533 Digital Image ProcessingImage Restoration© 2002-2003 by Yu Hen Hu2ECE533 Digital Image ProcessingWhat is Image RestorationThe purpose of image restoration is to restore a degraded/distorted image to its original content and quality.Distinctions to Image Enhancement»Image restoration assumes a degradation model that is known or can be estimated.»Original content and quality ≠ Good looking© 2002-2003 by Yu Hen Hu3ECE533 Digital Image ProcessingImage Degradation ModelSpatial variant degradation modelSpatial-invariant degradation model»Frequency domain representation( , ) ( , , , ) ( , ) ( , )g x y h x y m n f m n x yh= +��( , ) ( , ) ( , ) ( , )g x y h x m y n f m n x yh= - - +��( , ) ( , ) ( , ) ( , )G u v H u v F u v N u v= +© 2002-2003 by Yu Hen Hu4ECE533 Digital Image ProcessingNoise ModelsMost types of noise are modeled as known probability density functionsNoise model is decided based on understanding of the physics of the sources of noise. »Gaussian: poor illumination»Rayleigh: range image»Gamma, exp: laser imaging»Impulse: faulty switch during imaging, »Uniform is least used.Parameters can be estimated based on histogram on small flat area of an image© 2002-2003 by Yu Hen Hu5ECE533 Digital Image ProcessingNoise Removal Restoration MethodMean filters»Arithmetic mean filter»Geometric mean filter»Harmonic mean filter»Contra-harmonic mean filterOrder statistics filters»Median filter»Max and min filters»Mid-point filter»alpha-trimmed filtersAdaptive filters»Adaptive local noise reduction filter»Adaptive median filter© 2002-2003 by Yu Hen Hu6ECE533 Digital Image ProcessingMean Filters,( , )1ˆ( , ) ( , )x ys t Sf x y g s tmn�=�,1( , )ˆ( , ) ( , )x ymns t Sf x y g s t�� �=� �� �� ��© 2002-2003 by Yu Hen Hu7ECE533 Digital Image ProcessingContra-Harmonic Filters[ ][ ],,1( , )( , )( , )ˆ( , )( , )x yx yQs t SQs t Sg s tf x yg s t+��=��© 2002-2003 by Yu Hen Hu8ECE533 Digital Image ProcessingMedian Filter{ },( , )ˆ( , ) ( , )x ys t Sf x y median g s t�=Effective for removing salt-and-paper (impulsive) noise.© 2002-2003 by Yu Hen Hu9ECE533 Digital Image ProcessingLSI Degradation ModelsMotion Blur»Due to camera panning or fast motionAtmospheric turbulence blur»Due to long exposure time through atmosphere»Hufnagel and StanleyUniform out-of-focus blur:Uniform 2D Blurmin max1 0,( , )0 .ai bj i i ih i jotherwise+ = � ��=��2 22( , ) exp2i jh i j Ks� �+= � -� �� �2 2 221( , )0 .i j Rh i jRotherwisep�+ ��=���21/ 2 , / 2( , )0 .L i j Lh i jLotherwise�- � ��=���( )()5/ 62 2( , ) exph i j k i j= - � +© 2002-2003 by Yu Hen Hu10ECE533 Digital Image ProcessingTurbulence Blur Examples( )()5/ 62 2( , ) exph i j k i j= - � +© 2002-2003 by Yu Hen Hu11ECE533 Digital Image ProcessingMotion BlurOften due to camera panning or fast object motion. Linear along a specific direction.blurring filter20 40 60204060blurring filter mask2 4 6 82468original image20 40 60102030405060blurred image20 40 60102030405060Blurdemo.m© 2002-2003 by Yu Hen Hu12ECE533 Digital Image ProcessingInverse FilterRecall the degradation model:Given H(u,v), one may directly estimate the original image byAt (u,v) where H(u,v) 0, the noise N(u,v) term will be amplified!( , ) ( , ) ( , ) ( , )G u v H u v F u v N u v= +ˆ( , ) ( , ) / ( , )( , )( , )( , )F u v G u v H u vN u vF u vH u v== +original, f20 40 60204060degraded: g20 40 60204060inverse filter20 40 60204060Invfildemo.m© 2002-2003 by Yu Hen Hu13ECE533 Digital Image ProcessingWiener FilteringMinimum mean-square error filter»Assume f and are both 2D random sequences, uncorrelated to each other.»Goal: to minimize »Solution: Frequency selective scaling of inverse filter solution!»White noise, unknown Sf(u,v):{ }2ˆE f f-22( , )( , )ˆ( , )( , )( , ) ( , ) / ( , )fH u vG u vF u vH u vH u v S u v S u vh= �+22( , )( , )ˆ( , )( , )( , )H u vG u vF u vH u vH u v K= �+original, f20 40 60204060degraded: g20 40 60204060Wiener filter, K=0.220 40 60204060inverse filter20 40 60204060© 2002-2003 by Yu Hen Hu14ECE533 Digital Image ProcessingDerivation of Wiener FiltersGiven the degraded image g, the Wiener filter is an optimal filter hwin such that E{|| f – hwing||2} is minimized. Assume that f and are uncorrelated zero mean stationary 2D random sequences with known power spectrum Sf and Sn. Thus,{ } { }{ }{ }{ }{ }( )2 222 22 2( , ) ( , ) ( , )( , ) ( , ) ( , ) ( , )( , ) ( , ) ( , ) ( , ) ( , )( , ) ( , ) ( , ) ( , ) ( , )( , ) ( , ) ( , ) ( , ) (win winHwinH Hwin winf win f nH Hwin f winC E f h g E F u v H u v G u vE F u v H u v E F u v G u vH u v E F u v G u v H u v E G u vS u v H u v H u v S u v S u vH u v H u v S u v H u v H u= - = -= - �- � + �= + � � +- � � - � , ) ( , )fv S u v�{ }{ }{ }{ }22( , ) ( , )( , ) ( , )( , ) ( , )( , ) ( , ) 0fnHHE F u v S u vE N u v S u vE F u v N u vE F u v N u v=== =*2( , ) 0( , ) ( , )( , )( , ) ( , ) ( , )Set C/winfwinf nH u vH u v S u vH u vH u v S u v S u v� � = �=+© 2002-2003 by Yu Hen Hu15ECE533 Digital Image ProcessingConstrained Least Square (CLS) FilterFor each pixel, assume the noise has a Gaussian distribution. This leads to a likelihood function:A constraint representing prior distribution of f will be imposed:the exponential form of pdf of f is known as the Gibbs’ distribution.Since L(f) p(g|f), use Bayes rule, since g is given, to maximize the posterior probability, one should minimizeq is an operator based on prior knowledge about f. For example, it may be the Laplacian operator!221( ) exp **2L f g h fs� �� - -� ��{ }2( ) exp **p f q fa� -( | ) ( | ) ( ) / ( )p f g p g f p f p g=2 2** **g h f q fg- +© 2002-2003 by Yu Hen Hu16ECE533 Digital Image ProcessingIntuitive …
View Full Document