Local Enhancement 1 Averaging Fig 3.30 and Uncorrelated zero meanduces the noise variance2 22g x y f x y x yg x yMg x yE g x y f x yMx yx yx yiiMg( , ) ( , ) ( , )( , ) ( , )( ( , )) ( , ) ( , )( , )( , ) Re= +== =→→=∑ησ σησηη111Spatial Filtering Chapter 3 Required Reading: All sections except 3.8 Local Enhancement 2Image Forensics Project Guidelines • Process • Images Local Enhancement 3 Local Enhancement 4 Fig 3.30Local Enhancement 5 Another example Images with additive Gausian Noise; Independent Samples. I=imnoise(J,’Gaussian’); Local Enhancement 6 Averaged image Left: averaged image (10 samples); Right: original imageLocal Enhancement 7 Spatial filtering Frequency Spatial 0 LPF HPF BPF Local Enhancement 8 Smoothing (Low Pass) Filtering ω1"ω2"ω3"ω4"ω5"ω6"ω7"ω8"ω9"f1 f2 f3 (x,y) Replace f (x,y) with Linear filter LPF: reduces additive noise blurs the image sharpness details are lost (Example: Local averaging) Fig 3.35 f x y fiii^( , ) =∑ωLocal Enhancement 9 Fig 3.35: smoothing Local Enhancement 10 Fig 3.36: another exampleLocal Enhancement 11 Image Dithering • Dithering: to produce visually pleasing signals from heavily quantized data. – Halftoning: convert a gray scale image to a binary image by thresholding. – Dithering to “add” noise so that the resulting image is smoother than just thresholding (but still it is a binary image) – Your homework #4 explores this further with a MATLAB exercise. Local Enhancement 12 Median filtering Replace f (x,y) with median [ f (x’ , y’) ] (x’ , y’) E neighbourhood • Useful in eliminating intensity spikes. ( salt & pepper noise) • Better at preserving edges. Example: 10" 20" 20"20" 15" 20"25" 20" 100"( 10,15,20,20,20,20,20,25,100) Median=20 So replace (15) with (20)Local Enhancement 13 Median Filter: Root Signal Local Enhancement 14 Invariant Signals Invariant signals to a median filter: Constant Monotonically increasing decreasing length?Local Enhancement 15 Fig 3.37: Median Filtering example Local Enhancement 16 Media Filter: another example Original and with salt & pepper noise imnoise(image, ‘salt & pepper’);Local Enhancement 17 Donoised images Local averaging K=filter2(fspecial(‘average’,3),image)/255. Median filtered L=medfil2(image, [3 3]); Local Enhancement 18 Sharpening Filters • Enhance finer image details (such as edges) • Detect region /object boundaries. -1" -1" -1"-1" 8" -1"-1" -1" -1"Example:Local Enhancement 19 Unsharp Masking Subtract Low pass filtered version from the original emphasizes high frequency information I’ = A ( Original) - Low pass HP = O - LP A > 1 I’ = ( A - 1 ) O + HP A = 1 => I’ = HP A > 1 => LF components added back. Local Enhancement 20 Derivative Filters -1" -1" -1"-1" ω" -1"-1" -1" -1"1/9 Gradient ∇f =∂f∂x∂f∂yT∇f =∂f∂x2+∂f∂y212Local Enhancement 21 Edge Detection Gradient based methods x x0 x x0 f(x) f’(x) x x0 f “(x) f(x) d(.)/dx | . | Threshold f’(x) |f’(x)| < > Local max No Yes X0 is an edge Not an edge X0 not an edge ∇f =∂f∂x∂f∂yTLocal Enhancement 22 Digital edge detectors z1 z3 z4 z5 z6 z7 z8 z9 z2 Robert’s operator 1 0 0 -1 0 1 -1 0 prewitt | z5-z9 | | z6-z8 | -1 -1 -1 0 0 0 1 1 1 -1 0 1 -1 0 1 -1 0 1 Sobel’s -1 -2 -1 0 0 0 1 2 1 -1 0 1 -2 0 2 -1 0 1 ∇f ≈ z5− z8( )2+ z5− z6( )212∇f ≈ z5− z8+ z5− z6Local Enhancement 23 Fig 3.45: Sobel edge detector Local Enhancement 24 Laplacian based edge detectors 1 1 -4 1 1 • Rotationally symmetric, linear operator • Check for the zero crossings to detect edges • Second derivatives => sensitive to noise. ∇ =
View Full Document