Professional Documents
Culture Documents
/Rowan University
Introduction to
Digital Image
Processing
S. Mandayam/ DIP/ECE Dept./Rowan University
Module Overview
• Lecture 1
• Digital Image Fundamentals
• Lecture 2
• Digital Image Enhancement
• Digital Image Segmentation
• Digital Image Compression
S. Mandayam/ DIP/ECE Dept./Rowan University
Lecture 1
B B
G G
R R
R+G+B R+G+B
B B
G G
R R
R+G+B R+G+B
B B
G G
R R
R+G+B R+G+B
S. Mandayam/ DIP/ECE Dept./Rowan University
• Quantization
demos/demo1sampling_and_quantization/demo_quant.m
Fundamental Steps*
Preprocessing
Preprocessing Representation
Representation&&
(Enhancement
(Enhancement Segmentation
Segmentation Description
Description
&&Restoration)
Restoration)
Problem Image
Image Knowledge
Knowledge Recognition
Domain Acquisition Recognition&&
Acquisition Base
Base Interpretation
Interpretation
Result
*Rafael C. Gonzalez and Richard E. Woods, Digital Image Processing, Addison-Wesley, 1992
S. Mandayam/ DIP/ECE Dept./Rowan University
Point Processing
(Intensity Transformation)
s(x,y) = T{ r(x,y)}
Transformed Original
Gray Level Gray Level
Transformation
Function
>>imadjdemo
>>imadjust
S. Mandayam/ DIP/ECE Dept./Rowan University
Point Processing
• Pixel Operations
Point Processing
L-1 L-1
s2
s
s
s1
0 0
r r
0 L-1 0 r1 r2 L-1
>>imadjdemo
>>imadjust
S. Mandayam/ DIP/ECE Dept./Rowan University
Image Histogram
nk
p r (rk )
n
n k : No. of pixels with Gray Level k
n : Total no. of pixels in image
L : No. of Gray Levels
>>imadjdemo
>>imhist
S. Mandayam/ DIP/ECE Dept./Rowan University
Histogram Equalization
(Balancing)
k
sk T (rk ) pr (r j ); k 0, 1, 2,...., L 1
j 0
nk
p r (rk )
n
n k : No. of pixels with Gray Level k
n : Total no. of pixels in image
L : No. of Gray Levels
>>imadjdemo
>>histeq
S. Mandayam/ DIP/ECE Dept./Rowan University
Fundamental Steps*
Preprocessing
Preprocessing Representation
Representation&&
(Enhancement
(Enhancement Segmentation
Segmentation Description
Description
&&Restoration)
Restoration)
Problem Image
Image Knowledge
Knowledge Recognition
Domain Acquisition Recognition&&
Acquisition Base
Base Interpretation
Interpretation
Result
*Rafael C. Gonzalez and Richard E. Woods, Digital Image Processing, Addison-Wesley, 1992
S. Mandayam/ DIP/ECE Dept./Rowan University
z1 z2 z3 w1 w 2 w3
z4 z5 z6 w4 w 5 w6
z7 z8 z9 w7 w 8 w9
Replace
with R = w1z1 + w2z2 + ….. +w9z9
S. Mandayam/ DIP/ECE Dept./Rowan University
Edge Detection
Sobel Masks
-1 -2 -1 -1 0 1
0 0 0 -2 0 2
1 2 1 -1 0 1
>>edgedemo
demos/demo2spatial_filtering/edgegradientdemo.m >>edge
S. Mandayam/ DIP/ECE Dept./Rowan University
Fundamental Steps*
Preprocessing
Preprocessing Representation
Representation&&
(Enhancement
(Enhancement Segmentation
Segmentation Description
Description
&&Restoration)
Restoration)
Problem Image
Image Knowledge
Knowledge Recognition
Domain Acquisition Recognition&&
Acquisition Base
Base Interpretation
Interpretation
Result
*Rafael C. Gonzalez and Richard E. Woods, Digital Image Processing, Addison-Wesley, 1992
S. Mandayam/ DIP/ECE Dept./Rowan University
>>dctdemo
S. Mandayam/ DIP/ECE Dept./Rowan University
JPEG Compression
Standard
Level Compute Reorder to form
f(x,y) DCT Normalize
Shift 1-D Sequence
F(u,v)
Compute
DC Coefficient
Compute
AC Coefficients
http://www.jpeg.org/
S. Mandayam/ DIP/ECE Dept./Rowan University
Summary