Professional Documents
Culture Documents
Richard Alan Peters II Department of Electrical Engineering and Computer Science Fall Semester 2011
. 1. %. {. . {. . . . . .
This work is licensed under the Creative Commons Attribution-Noncommercial 2.5 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/2.5/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
25 August 2011
Topics
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.
Image formation Point processing and equalization Color correction The Fourier transform Convolution Image sampling, warping, and stitching Spatial filtering Noise reduction Mathematical morphology High dynamic range imaging Image compression
1999-2011 by Richard Alan Peters II 3
25 August 2011
Gromit
likes cheese
Wallace and Gromit will be subjects of some of the imagery in this introduction.
http://www.aardman.com/wallaceandgromit/index.shtml
25 August 2011 1999-2011 by Richard Alan Peters II 4
Image Formation
25 August 2011
Image Formation
25 August 2011
Image Formation
image of object
25 August 2011
Image Formation
digital camera
25 August 2011
Image Formation
sampled image
25 August 2011
Image Formation
25 August 2011
real image
sampled
quantized
25 August 2011
12
Digital Image
a grid of squares, each of which contains a single color
Color images have 3 values per pixel; monochrome images have 1 value per pixel.
25 August 2011
13
Color Images
Are constructed from three intensity maps. Each intensity map is projected through a color filter (e.g., red, green, or blue, or cyan, magenta, or yellow) to create a monochrome image. The intensity maps are overlaid to create a color image. Each pixel in a color image is a three element vector.
25 August 2011 1999-2011 by Richard Alan Peters II 14
25 August 2011
15
Point Processing
- gamma
- brightness
original
+ brightness
+ gamma
histogram mod
25 August 2011
- contrast
original
+ contrast
histogram EQ
16
Color Processing
25 August 2011
17
25 August 2011
19
The simultaneous red + blue response causes us to perceive a continuous range of hues on a circle. No hue is greater than or less than any other hue.
25 August 2011
20
The eye has 3 types of photoreceptors: sensitive to red, green, or blue light.
The brain transforms RGB into separate brightness and color channels (e.g., LHS).
brain photo receptors
21
Color Perception
16 pixelization of:
luminance and chrominance (hue+saturation) are perceived with different resolutions, as are red, green and blue.
all bands
luminance
chrominance
red
25 August 2011
green
1999-2011 by Richard Alan Peters II
blue
22
Color Perception
16 pixelization of:
all bands
luminance
chrominance
red
25 August 2011
green
1999-2011 by Richard Alan Peters II
blue
23
25 August 2011
24
Color Transformations
222 222 218 17 121 171 17 122 114 222 222 185
, that mapped:
240 171 160 236 227 106 240 230 166
25 August 2011
25
I r, c
u 0 v 0
I u ,v e
i2
ur R
vc C
where
I u,v
1 RC
R 1C 1
i2
I ( r ,c ) e
r 0c 0
ur R
vc C
2D Sinusoids:
... are plane waves with grayscale amplitudes, periods in terms of lengths, ...
I r, c
A 2 cos 2
c cos C
r sin R
orientation
A = phase shift
25 August 2011 1999-2011 by Richard Alan Peters II 27
2D Sinusoids:
c
25 August 2011
28
Here is the same coefficient plotted as magnitude, A, and a phase, , and displayed in the space domain as a sinusoid.
25 August 2011 1999-2011 by Richard Alan Peters II 30
magnitude
I
25 August 2011
phase
[F{I}]
31
|F{I}|
1999-2011 by Richard Alan Peters II
I r, c
dudv
I u, v
I r, c e
i 2 ( uc vr )
dcdr
The continuous Fourier transform assumes a continuous image exists in a finite region of an infinite plane.
The BoingBoing Bloggers
25 August 2011
32
R 1C 1
I (r,c)
v 0u 0
i2
u,v e
uc C
vr R
I
The BoingBoing Bloggers
R 1C 1
u, v
r 0c 0
I r ,c e
i2
cu C
rv R
25 August 2011
33
Convolution
r 16, c 16 r 16, c 16
r 0, c 0
r 16, c 16
r 16, c 16
F{f
M oreover,
g}
F G.
g } F G. represents convolutio n represents pointwise multiplica tion Then, a spatial convolution can be computed by f g
F{f
The Fourier Transform of a product equals the convolution of the Fourier Transforms. Similarly, the Fourier Transform of a convolution is the product of the Fourier Transforms
-1
F G.
25 August 2011
35
(d) 37
25 August 2011
Resampling
nearest neighbor nearest neighbor
16
(resizing)
bicubic interpolation
25 August 2011 1999-2011 by Richard Alan Peters II
bicubic interpolation
38
Rotation
25 August 2011
Image Warping
25 August 2011
40
Merged*
25 August 2011
*not
so good.
41
Merged*
25 August 2011
*much
better.
42
Original Image
Power Spectrum
Gaussian LPF in FD
25 August 2011
43
FD Filtering: Lowpass
Filtered Image
Original Image
25 August 2011
44
FD Filtering: Highpass
Filtered Image
Original Image
25 August 2011
45
FD Filtering: Highpass
signed image with 0 at middle gray
Filtered Image
Original Image
25 August 2011
46
Spatial Filtering
blurred
original
sharpened
25 August 2011
47
Spatial Filtering
bandpass filter
original
unsharp masking
25 August 2011
48
Spatial Filtering
signed image with 0 at middle gray
bandpass filter
original
unsharp masking
25 August 2011
49
Motion Blur
regional vertical
original zoom
25 August 2011
rotational
50
Noise Reduction
blurred image
25 August 2011
color noise
1999-2011 by Richard Alan Peters II
color-only blur
51
Noise Reduction
blurred image
25 August 2011
color noise
1999-2011 by Richard Alan Peters II
Noise Reduction
periodic noise
25 August 2011
original
1999-2011 by Richard Alan Peters II
+ shot noise
25 August 2011
s&p noise
1999-2011 by Richard Alan Peters II
- shot noise
54
original
25 August 2011
s&p noise
1999-2011 by Richard Alan Peters II
median filter
55
+ shot noise
25 August 2011
min filter
1999-2011 by Richard Alan Peters II
maxmin filter
56
- shot noise
25 August 2011
max filter
1999-2011 by Richard Alan Peters II
minmax
57
58
Used after opening to grow back pieces of the original image that are connected to the opening. Permits the removal of small regions that are disjoint from larger objects without distorting the small features of the large objects.
original
25 August 2011
opened
1999-2011 by Richard Alan Peters II
reconstructed
59
60
25 August 2011
61
25 August 2011
62
25 August 2011
63
Photographs by Robert Fenton of a battlefield in the Crimean war taken on 23 April 1855. From Morris, Errol, Which Came First, the Chicken or the Egg?, Parts 1-3, New York Times, Zoom Editorial Section, 25 Sept. 2007 (pt.1), 7 Oct. 2007 (pt.2), 30 Oct. 2007 (pt.3).
25 August 2011 1999-2011 by Richard Alan Peters II 64
Photographs by Robert Fenton of a battlefield in the Crimean war taken on 23 April 1855. From Morris, Errol, Which Came First, the Chicken or the Egg?, Parts 1-3, New York Times, Zoom Editorial Section, 25 Sept. 2007 (pt.1), 7 Oct. 2007 (pt.2), 30 Oct. 2007 (pt.3).
25 August 2011
65
Photographs by Robert Fenton of a battlefield in the Crimean war taken on 23 April 1855. From Morris, Errol, Which Came First, the Chicken or the Egg?, Parts 1-3, New York Times, Zoom Editorial Section, 25 Sept. 2007 (pt.1), 7 Oct. 2007 (pt.2), 30 Oct. 2007 (pt.3).
25 August 2011
66
under exposed
25 August 2011 1999-2011 by Richard Alan Peters II 67
default exposure
25 August 2011 1999-2011 by Richard Alan Peters II 68
over exposed
25 August 2011 1999-2011 by Richard Alan Peters II 69
combined
25 August 2011 1999-2011 by Richard Alan Peters II 70
Image Compression
Original image is 5244w x 4716h @ 1200 ppi: 127MBytes
25 August 2011
72
25 August 2011
73
Image Compositing
Combine parts from separate images to form a new image. Its difficult to do well. Requires relative positions, orientations, and scales to be correct. Lighting of objects must be consistent within the separate images. Brightness, contrast, color balance, and saturation must match. Noise color, amplitude, and patterns must be seamless.
25 August 2011
74
Nice. Now for the way hed wear his hair if he had any.
25 August 2011 1999-2011 by Richard Alan Peters II 78
In the studio!
25 August 2011 1999-2011 by Richard Alan Peters II 81