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) 2. Position Independent Gray Level Mapping s=T(r)
Negation
2. Gamma Transformation s=T(r) 2. Gamma Transformation s=T(r)
Gamma Correction of CRT
Image Enhancement by Gamma Transform: s=c.r ɣ
Image Enhancement by Gray level mapping: s=c.r ɣ
Image Enhancement by Contrast Stretching
Image Enhancement by Gray level mapping
HİSTOGRAM PROCESSİNG: H(rk)=nk rk: kth gray level, nk: number of pixels with gray value rk 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 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(r k )= h(r k )+1 Find the cumulative histogram hc(r k )= hc(r k-1 )+ hc(r k ) Set T(r k-1 ) =round [{(L-1)/NM}. hc(r k-1 )] Create the equalized image, s k = T(r k )
Histogram Equalization
Equalized Histogram
Histogram Specification
Histogram Modification
Histogram of a dark image
Histogram Equalization
Specified Histogram
Local Histogram Equalization
Image Subtraction
Convolution or crosscorrelation
Position Dependent Gray Level Mapping Use convolution or correlation: f*h Position Dependent Gray Level Mapping Use convolution or correlation: f*h
Define a mask and correlate it with the image
SMOOTHING
Image Enhancement WITH SMOOTING
Averaging blurrs the image
Image Enhancement WITH AVERAGING AND THRESHOLDING Image Enhancement WITH AVERAGING AND THRESHOLDING
Restricted Averaging Apply averaging to only pixels with brightness value outside a predefined interval. Mask h(i,j) = 1For 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
Median filtering breaks the straight lines Square filter: Cross filter
Image Enhancement with averaging and median filtering
EDGE PROFILES Edges are the pixels where the brightness changes abrubtly. It is a vector variable with magnitude and direction
EDGES, GRADIENT AND LAPLACIAN
SMOOT EDGES, NOISY EDGES
Continuous world 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
Discrete 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) |
GRADIENT EDGE MASKS Approximation in discrete grid GRADIENT EDGE MASKS Approximation in discrete grid
GRADIENT EDGE MASKS
GRADİENT MASKS
Edge Detection
GRADIENT OPERATIONS
EDGES, GRADIENT AND LAPLACIAN
Edg Detection with Laplacian
Gaussian Masks
L.O.G LAPLACIAN of GAUSSIAN EDGE MASKS
Laplacian Operator
EDGE DETECTION by L.O.G
Image Enhancement WITH LAPLACIAN AND SOBEL
Image Enhancement (cont.)
Edge Detection with High Boost
Image Enhancement with Laplacian
Marr Hildreth Theory L.L HVS constructs primal sketch based on edges, lines and blobs Therefore L.o.G filters are mathematical representation of HVS at low level
Vector Spaces Space of vectors, closed under addition and scalar multiplication
Image Averaging as Vector addition
Scaler product, dot product, norm
Norm of Images
Orthogonal Images, Distance,Basis
Roberts Basis: 2x2 Orthogonal
Frei-Chen Basis: 3x3 orthogonal
Cauchy Schwartz Inequality U+V ≤ U + V
Schwartz Inequality
Quotient: Angle Between two images
Fourier Analysis
Fourier Transform Pair Given image I(x,y), its fourier transform is
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Fourier Transform of an Image is a complex matrix Let F =[F(u,v)] F = Φ MM I(x,y) Φ NN I(x,y)= Φ* MM F Φ* MM Where Φ JJ (k,l)= [Φ JJ (k,l) ] and Φ JJ (k,l) = (1/J) exp(2Πjkl/J) for k,l= 0,…,J-1
Fourier Transform
Properties Convolution Given the FT pair of an image I(x,y) F(u,v) I(x,y)* m(x,y) F(u,v). H(u,v) and I(x,y) m(x,y) F(u,v)* H(u,v)
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Design of H(u,v) Low Pass filter H(u,v) = 1 if |u,v |< r 0 o.w. High pass filter H(u,v) = 1 if |u,v |> r 0 o.w Band pass filter H(u,v) = 1 if r1<|u,v |< r2 0 o.w
Fourier Transform-High Pas Filtering
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Spatial Laplacian Masks and its Fourier Transform
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain
Image Enhancement in the Frequency Domain Image Enhancement in the Frequency Domain