Rosenfeld & Kak, 1976 Gray Level Modification – Contrast Stretching (1) Underexposed picture Stretching the gray scale by a (middle half of the scale) factor of 2 1 IIP Rosenfeld & Kak, 1976 Gray Level Modification – Contrast Stretching (2) − z z [ ] = − + ' k 1 t ( z ) t ( z ) t z − 1 1 t t k 1 ≤ ≤ ≤ ≤ ' satisfies z t ( z ) z for all z z z 1 k 1 k when for any transf ormation t ( z ) = = t min t ( z ), t max t ( z ) 1 k Stretching the middle third part gray scale by a factor of 2 while compressing the upper and lower thirds by a factor of 2 2 IIP 1
Histogram Matching (in comparison to histogram equalization) • Why having a uniform histogram for the output image and not specifying a desired histogram? r ∫ = = s T r ( ) p w dw ( ) r 0 z ∫ = = G z ( ) p t dt ( ) s z 0 [ ] = − = − 1 1 z G ( ) s G T r ( ) 3 IIP Image Enhancement – Agenda • Algebraic/logic operations • Geometric operations • Image enhancement in the spatial domain by filtering 4 IIP 2
Algebraic Operations • Operated pixel-by-pixel = + C x y ( , ) A x y ( , ) B x y ( , ) = − C x y ( , ) A x y ( , ) B x y ( , ) = C x y ( , ) A x y ( , ) x ( , ) B x y = ÷ C x y ( , ) A x y ( , ) B x y ( , ) where A & B are the input images and C is the output image (and of course complex algebraic equations involving several images may be formed) 5 IIP Uses of Algebraic Operations • Addition 1) averaging multiple images of the same scene to reduce additive random noise 2) Superimposition of images (“double exposure”) • Subtraction 1) remove additive pattern (background, periodic noise, additive contamination) 2) Change detection analysis 3) computing gradients for locating edges 4) motion detection • Multiplication & Division – less applicative 6 IIP 3
Applications of Algebraic Operations • Averaging for noise reduction (multiple images � stationary component is unchanged & noise is smoothed) • Image subtraction � Background subtraction � Motion detection � Gradient magnitude 7 IIP Castleman, 1996 Averaging for Noise Reduction (1) • Assume a set of M images of the form = + D ( x , y ) S ( x , y ) N ( x , y ) i i where S is the image and N i are (uncorrelated random) noise images (e.g., electronic noise in the digitizing system) having zero mean • Also, define the SNR power ratio for each point in the image as 2 S ( , ) x y = P x y ( , ) { } ε 2 N ( , ) x y 8 IIP 4
Averaging for Noise Reduction (2) • If we average M images to form M 1 ∑ = + D ( x , y ) [ S ( x , y ) N ( x , y )] i M = i 1 the SNR power ratio turns into 2 S ( x , y ) = P ( x , y ) 2 M 1 ∑ ε N ( x , y ) i M = i 1 9 IIP Averaging for Noise Reduction (3) • Let’s factor 1/ M out of the denominator and write the square explicitly to get 2 2 M S ( x , y ) = P ( x , y ) M M ∑∑ ε ( , ) ( , ) N x y N x y j i = = j 1 i 1 10 IIP 5
Averaging for Noise Reduction (4) • Since the noise images are uncorrelated and having zero mean { } ε = N ( x , y ) 0 i { } { } { } ε + = ε + ε N ( x , y ) N ( x , y ) N ( x , y ) N ( x , y ) i j i j { } } { } { ε = ε ε N ( x , y ) N ( x , y ) N ( x , y ) N ( x , y ) i j i j ∀ ≠ for i j 11 IIP Averaging for Noise Reduction (5) • We can write, P ( x , y ) 2 2 M S ( x , y ) = M M M ∑ ∑∑ ε + ε 2 N ( x , y ) N ( x , y ) N ( x , y ) i i j = = = i 1 i 1 j 1 ≠ j i 2 2 M S ( x , y ) = { } } { } M M M { ∑ ∑∑ ε + ε ε 2 N ( x , y ) N ( x , y ) N ( x , y ) i i j = = = i 1 i 1 j 1 ≠ j i 12 IIP 6
Averaging for Noise Reduction (6) • Since the expectation in the 2 nd term of the denominator vanishes, and noise images come from the same ensemble thus all terms in the 1 st summation of the denominator are identical, we obtain 2 2 M S ( , ) x y = = P x y ( , ) MP x y ( , ). { } ε 2 M N ( , ) x y That is, averaging M images increases the SNR power ratio by the factor M at all points and the SNR amplitude ratio by M 13 IIP Castleman, 1996 Image Subtraction (1) – Background Subtraction 14 IIP 7
Gonzalez & Woods, 2002 Image Subtraction (2) 15 IIP Castleman, 1996 Image Subtraction (3) – Motion Detection 16 IIP 8
Gonzalez & Woods, 2002 Logic Operations (AND, OR, NOT) 17 IIP Geometric Operations • Geometric operations change the spatial relationships among image objects. Theoretically, every point in the input image may move to any position in the output image • geometric operation = spatial transformation + gray-level interpolation •Nearest neighbor •Translation •Rotation •Bilinear •Scaling •Bicubic 18 IIP 9
Spatial Transformations (1) • We need to preserve the continuity of features (edges, corners…) and connectivity of objects • Thus, we specify mathematical spatial relationship between points in both images [ ] = = ' ' g x y ( , ) f x y ( , ) f a x y b x y ( , ), ( , ) ( , ) & ( , ) are input and output images f x y g x y a x y ( , ) & ( , ) uniquely specify the transformation b x y 19 IIP Spatial Transformations (2) • Simple cases for the general spatial transformation [ ] = = ' ' g x y ( , ) f x y ( , ) f a x y b x y ( , ), ( , ) = = → ( , ) ( , ) identity a x y x & b x y y = + = + → a x y ( , ) x x & b x y ( , ) y y translation 0 o = = → a x y ( , ) x c & / b x y ( , ) y d / magnification/scale = α − α = α + α → a x y ( , ) x cos( ) y sin( ) & b x y ( , ) x sin( ) y cos( ) rotation • And combinations of transformations 20 IIP 10
Recommend
More recommend