1.13k likes | 1.26k Views
Enhancing Images Ch 5:Shapiro, Ch 3:Gonzales. Gray level Mapping. Brightness Transform: 1. Position Dependent f(i,j)= g(i,j). e(i,j) g:Clean image e:position dependent noise 2. Position independent. 2. Position Independent Gray Level Mapping s =T( r ). Negation.
E N D
Gray level Mapping Brightness Transform: 1. Position Dependent f(i,j)= g(i,j). e(i,j) g:Clean image e:position dependent noise 2. Position independent
2. Gamma Transformation s=T(r)
HİSTOGRAM PROCESSİNG: H(rk)=nk rk: kth gray level, nk: number of pixels with gray value rk
Histogram Equalization Goal: Find a transformation which yields a histogram with uniform density ?
Algorithm: Histogram Equalization • Create an array h with L gray values • Initialize with o value • Find the histogram h(rk)= h(rk)+1 • Find the cumulative histogram hc(rk)= hc(rk-1)+ hc(rk) • Set T(rk-1) =round [{(L-1)/NM}. hc(rk-1)] • Create the equalized image, sk= T(rk)
Position Dependent Gray Level Mapping Use convolution or correlation: f*h
Image Enhancement WITH AVERAGING AND THRESHOLDING
Apply averaging to only pixels with brightness value outside a predefined interval. Mask h(i,j) = Restricted Averaging • For g(m+i,n+j)€ [min, max] • 0 otherwise Q: Study edge strenght smoothing, inverse gradient and rotating mask
Median Filtering • Find a median value of a given neighborhood. • Removes sand like noise 0 1 1 2 2 2 2 3 3
Median filtering breaks the straight lines Square filter: 0 0 0 5 5 5 5 5 5 Cross filter 0 0 0 5 5
EDGE PROFILES Edges are the pixels where the brightness changes abrubtly. It is a vector variable with magnitude and direction
Gradient Δg(x,y) = ∂g/ ∂x + ∂g/ ∂y Magnitude: |Δg(x,y) | = √ (∂g/ ∂x)2 + (∂g/ ∂y) 2 Phase : Ψ = arg (∂g/ ∂x , ∂g/ ∂y) radians Continuous world
Use difference in various directions Δi g(i,j) = g(i,j) - g(i+1,j) or Δj g(i,j) = g(i,j) - g(i,j+1) or Δij g(i,j) = g(i,j)- g(i+1,j+1) or |Δ g(i,j) | = |g(i,j)- g(i+1,j+1) | + |g(i,j+1)- g(i+1,j) | Discrete world
GRADIENT EDGE MASKS Approximation in discrete grid