Module 3
Module 3
Background
1 M −1 N −1
F (u, v) =
MN x=0 y =0
f ( x, y )e − j 2 ( ux / M + vy / N )
M −1 N −1
f ( x, y) = F (u, v)e j 2 (ux / M +vy / N )
u =0 v =0
1
F (u, v) = R (u, v) + I (u, v)
2 2 2 ( spectrum)
I (u, v)
(u, v) = tan−1 (phase angle)
R(u, v)
P(u,v) = F (u, v) = R 2 (u, v) + I 2 (u, v) (powerspectrum)
2
f ( x, y)(−1) x + y = F (u −
M
2
N
, v − ) (shift)
2
1 M −1 N −1
F (0,0) =
MN x =0 y =0
f ( x, y) (average)
shift
Department of Computer Science & Engineering
Dr. Justin Varghese Slide 12
19ECS352: IMAGE PROCESSING
DFT
DFT
A
DFT
B
DFT
A
DFT
B DFT
Rectangle
Its DFT
Notch filter
Result of ILPF
Example
Example
Examples
Homomorphic Filter
Image “Types”
(categorized by “color”)
◼ Binary Image
◼ has exactly two colors
◼ Grayscale
◼ has no chromatic content
◼ Color
◼ contains some pixels with color
◼ more than two colors exist
and intensities
◼ c.f. Human discern only two dozen shades of
grays
Primary Colors
Color of light: R G B
Color Models
• Color Model
– A mathematical system for representing color
• The human eye combines 3 primary colors (using the 3 different types of
cones) to discern all possible colors.
Color Models
Color models
◼ Color model, color space, color system
◼ Specify colors in a standard way
Source: www.mitsubishi.com
Pixel depth
◼ Pixel depth: the number of bits used to represent each
pixel in RGB space
◼ Full-color image: 24-bit RGB color image
◼ (R, G, B) = (8 bits, 8 bits, 8 bits)
C 1 R
M = 1 − G
Y 1 B
Light Intensity
◼ Note that intensity is a weighted function of the r, g, b values.
◼ The human eye doesn’t weight each component identically!
◼ Assume three light sources have the same actual intensity but
are colored red, green, and blue
The green light will appear brightest followed by red and blue
Intensity slicing
Frequency slicing
Color Quantization
Intensity Slicing
◼ Pixels with gray-scale (intensity) value in the range of (f i-1 , fi) are
rendered with color Ci
Color Quantization
◼ In low end monitors, the monitor cannot display
all possible colors.
◼ Select a set of colors, save them in a look-up
table (also known as color map or color palette)
◼ Any color is quantized to one of the indexed
colors
◼ Only needs to save the index as the image pixel
value and in the display buffer
◼ Vector-based processing
◼ Process the color vector of each pixel
vectors
◼ Operation on each component of a vector
• Neighborhood processing
Neighborhood
Centered at (x,y)
1
R( x, y)
K ( x, y )S xy
1
c( x, y) = G( x, y)
per-component processing
K ( x, y )S xy
1
K B( x, y)
( x, y )S xy
Department of Computer Science & Engineering
Dr. Justin Varghese Slide 79
19ECS352: IMAGE PROCESSING
original R
G B
H S I
Department of Computer Science & Engineering
Dr. Justin Varghese Slide 80
19ECS352: IMAGE PROCESSING
Questions?