dr. ghassabi [email protected] tehran shomal university spring 2015 [email protected]...

44
Dr. Ghassabi [email protected] Tehran shomal University Spring 2015 Digital Image Processing Session 3 1

Upload: kathlyn-davidson

Post on 17-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

1

Dr. [email protected]

Tehran shomal UniversitySpring 2015

Digital Image ProcessingSession 3

2

Outline

• Introduction• Digital Image Fundamentals• Intensity Transformations and Spatial Filtering• Filtering in the Frequency Domain• Image Restoration and Reconstruction• Color Image Processing • Wavelets and Multi resolution Processing• Image Compression• Morphological Operation• Object representation• Object recognition

OutlineChapter 3

• Background• Some Basic Intensity Transformation Functions• Histogram Processing• Fundamentals of Spatial Filtering• Smoothing Spatial Filters• Sharpening Spatial Filters• Combining Spatial Enhancement Tools

Image Enhancement

• Methods– Spatial Domain:

• Linear• Nonlinear

– Frequency Domain:• Linear• Nonlinear

IE in Spatial Domain

, ,g x y T f x y

Transformation

• For 11 neighborhood: – Contrast Enhancement/Stretching/Point process

• For w w neighborhood:– Filtering/Mask/Kernel/Window/Template Processing

s T r

IE in Spatial Domain

Input gray level, r

Ou

tpu

t gr

ay le

vel,

s

Negative

Log

nth root

Identity

nth power

Inverse Log Some Basic Intensity Transformation Functions

Image Negatives

• Image Negatives: 1s L r

Image Negatives

L x0

L

yy=L-x

Log Transformation

Log Transformation

Range Compression

)1(log10 xcy

c=100

Lx

0

y

Power-Law(Gamma) Transformations

s c r

Power-Law(Gamma) Transformations

Gamma Correction:

1.8 2.5r

11.8 2.5r

1.8 2.5r

Power-Law(Gamma) Transformations

Original =0.6

=0.4 =0.3

Power-Law(Gamma) Transformations(Effect of decreasing gamma)

Original =3

=4 =5

Power-Law(Gamma) Transformations(Effect of decreasing gamma)

Piecewise-Linear Transformation Functions

• Contrast Stretching• Contrast slicing• Bite-Plane slicing

Contrast Stretching

Lxbybx

bxayax

axx

y

b

a

)(

)(

0

Lx

0 a b

ya

yb

200,30,1,2,2.0,150,50 ba yyba

y

Contrast stretching

Original

C. S. THR.

Contrast Stretching

Clipping

Lxbab

bxaax

ax

y

)(

)(

00

L x0 a b

2,150,50 ba

y

Gray-level Slicing

Gray-level Slicing

Gray-level Slicing

Gray-level Slicing

Gray-level Slicing

Bit-plane SlicingHighlighting the contribution made to total image appearance by specific bitsSuppose each pixel is represented by 8 bitsHigher-order bits contain the majority of the visually significant dataUseful for analyzing the relative importance played by each bit of the image

Bit-plane Slicing

Bit-plane Slicing

The (binary) image for bit-plane 7 can be obtained by processing the input image with a thresholding gray-level transformation.

Map all levels between 0 and 127 to 0Map all levels between 129 and 255 to 255

Bit-plane Slicing - Fractal Image

Bit-plane Slicing - Fractal Image

Bit-plane 7 Bit-plane 6

Bit-plane 5 Bit-plane 4 Bit-plane 3

Bit-plane 2 Bit-plane 1 Bit-plane 0

Bit-plane Slicing

Histogram Processing

Enhancement based on statistical Properties: Local, Global

Histogram Definition

h(rk)=nk

Where rk is the kth gray level and nk is the number of pixels in the image having gray level rk

Normalized histogram:

P(rk)=nk/n

Histogram of an image represents the relative frequency of occurrence of various gray levels in the image

Histogram Examples

• Histogram Visual Meaning:– Dark– Bright– Low Contrast– High Contrast

Histogram Example

Histogram Example

Histogram Modification

• Histogram Stretching• Histogram Shrink• Histogram Sliding

Histogram Stretching

Histogram Stretching

Histogram Stretching

Histogram Shrinking

Histogram Shrinking

Histogram Sliding