İmage enhancement Prepare image for further processing steps for specific applications.

Post on 17-Jan-2018

223 views 0 download

description

Image Enhancement in spatial domain Brightness Transform: 1. Position Dependent f(i,j)= g(i,j). e(i,j) g:Clean image e:position dependent noise 2. Gray scale Transform

transcript

İmage enhancement

Prepare image for further processing steps for specific applications

Image enhancement: Pre-processing

• Spatial domain techniques: Find a transformation T

f(x,y) g(x,y)• Frequency domain techniques

• f(x,y) F(u,v) G(u,v) g(x,y) F-1F T

T

Image Enhancement in spatial domain

• Brightness Transform: 1. Position Dependent

f(i,j)= g(i,j). e(i,j)g:Clean imagee:position dependent noise

2. Gray scale Transform

Gray scale transform: s=T(r)

• r original color, s transformed color

L-1

L-1 r

sS=r

S=r

S=r

Gray Scale Transformq=T(p)

Binarize and contrast streching

Image Enhancement THRESHOLDING

Log Transform:q= clog (1+p)

Negation

Power law transform

Image Enhancement by Gray scale transform

Image Enhancement by Gray scale transform

Image Enhancement by Gray Scale Transform

Image Enhancement by Gray scale transform

Image Enhancement by Gray scale transform

Bit plane slicing• Soppose each pixel is represented by n-bits.• Represent each bit by a plane

Bit-plane slicingImage Enhancement in the

Spatial Domain

Chapter 3Image Enhancement in the

Spatial Domain

Histogram processing

• Given an image with L gray levels• h(rk) = nk

• rk: kth gray level

• nk: number of pixels with gray level rk

• Normalized histogramP(rk) = nk/NN:total number of pixels

Histograms of various image

Histogram Equalization

Find a transformation which yields a histogram with uniform density

?

Histogram of a dark image

Equalized Histogram

Specified Histogram

Local Histogram Equalization

Local ProcessingConvolution 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

Restricted Averaging

• Apply averaging to only pixels with brightness value outside a predefined interval.

Mask h(i,j) = 1 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 2 12 1 23 3 2

0 2 12 2 23 3 2

0 1 1 2 2 2 2 3 3

Median filtering breaks the straight lines

5 5 5 5 55 5 5 5 50 0 0 0 05 5 5 5 55 5 5 5 5

Square filter:0 0 0 5 5 5 5 5 5

Cross filter0 0 0 5 5

Image Enhancement with averaging and median filtering

Image sharpening filters

Edge detectors

What is edge?

• Edges are the pixels where the brightness changes abrubtly.

• It is a vector variable with magnitude and direction

EDGE PROFILES

Continuous world first derivativeGradient

• Δ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 derivatives: Gradient

• 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) |

Continuous world second derivativeLaplacian

• Δ2g(x,y) = ∂2g/ ∂2 x + ∂2 g/ ∂2 y

EDGES, GRADIENT AND LAPLACIAN

GRADİENT AND LAPLACIEN OF SMOOT EDGES, NOISY EDGES

GRADIENT EDGE MASKSApproximation in discrete grid

GRADIENT EDGE MASKS

Edge detection

Edge detection

Edge detection

LAPLACIAN MASKS

LAPLACIAN of GAUSSIAN EDGE MASKS

EDGE DETECTION

EDGE DETECTION

EDGE DETECTION

HOUGH TRANSFORM

PARAMETER PLANE OF HOUGH TRANSFORM

HOUGH TRANSFORM IN POLAR FORM

HOUGH TRANSFORM OF POINTS IN POLAR FORM

Chapter 10Image Segmentation

Chapter 10Image Segmentation

GRADIENT OPERATIONS

Image Enhancement WITH LAPLACIAN AND SOBEL

Image Enhancement (cont.)

Edg Detection with Laplacian

Image Enhancement with high pass filter

Edge Detection with High Boost

Laplacian Operator

Image Enhancement with Laplacian

Chapter 3Image Enhancement in the

Spatial Domain

Chapter 3Image Enhancement in the

Spatial Domain

Chapter 3Image Enhancement in the

Spatial Domain

Histogram Equalization

Chapter 3Image Enhancement in the

Spatial Domain

Chapter 3Image Enhancement in the

Spatial Domain

Chapter 3Image Enhancement in the

Spatial Domain

Chapter 3Image Enhancement in the

Spatial Domain

Chapter 3Image Enhancement in the

Spatial Domain

Chapter 3Image Enhancement in the

Spatial Domain

Chapter 3Image Enhancement in the

Spatial Domain

Chapter 3Image Enhancement in the

Spatial Domain

Chapter 3Image Enhancement in the

Spatial Domain