Uploaded by ghiso.1

DIGITAL IMAGE PROCESSING Solution Manual

advertisement
DIGITAL IMAGE PROCESSING
Kenneth R. Castleman
Prentice-Hall, 1996
Solution Manual – Part One
Revised January 01, 2020
This is a companion document to the textbook Digital Image
Processing by Kenneth R. Castleman, (Prentice-Hall, 1996).
It contains solutions to homework problems and additional
information regarding the project assignments in the book.
An errata sheet is located at the end of this document.
This textbook is also supported by a Web page at
<http://www.castleman.org/>. This page includes further
information of use to instructors and students of image
processing, including MathCAD and WiT files, example projects,
sample images and links to other image processing-related Web
sites.
Since its publication in 1996, this book has been translated
into Japanese and Chinese and reprinted in paperback format
format in India. It is still used in undergraduate and graduate
courses around the world.
The publisher sold out of this solution manual several years
ago, and it was unavailable since that time. It is now available
on-line, in three parts, corresponding to the three parts of the
book, at <https://www.academia.edu/>.
The author has since co-authored another book, Microscope Image
Processing, (Elsevier/Academic Press, 2008) which is focused
more on applications of digital image processing that relate to
various forms of microscopy. A second edition of that book is
expected to be published in mid-2021.
Part One
1/21
Digital Image Processing
Solution Manual
CHAPTER 1
1. Fancy logos, freeze frame, pixelated faces to obscure
identity, graphical annotation, electronic zoom, slow motion,
graphical maps, picture-in-picture inserts, chroma-key (blue
background) overlays, 3-D animation, etc.
2,3. Rendering of realistic looking 3-D fantasy environments,
simulation of motion and object interactions, compact storage,
retrieval and superimposition of images, etc.
4. Image averaging, image subtraction, image enhancement,
graphical annotation, pattern recognition, image compression,
image archiving, etc.
5. Image enhancement, measurement of size and distances, noise
reduction, image subtraction for comparison, geometric
distortion removal, graphical annotation, stereometry (Sec.
22.4), 3-D modeling, etc.
6. A nameplate for desk or office, a sign, a map, a cartoon, a
set of icons, etc.
7. 32x32 = 1024 pixels per icon. 161024 = 24096  101233 total icons,
of which 101227 are potentially useful. 100 dpi  10,000 pixels
per sq. in. or approximately ten icons per sq. in. So it would
take 101226 sq. in. At 4x109 sq. in. per sq. mile, that’s
2.5x101216 sq. mi.
8. 200x200 = 40,000 pixels per image. 4040,000  1064,082 total
images of which only 1064,073 are recognizable. At 3.154x107
seconds per year, it would take about 1064,066 years.
Part One
2/21
Digital Image Processing
Solution Manual
CHAPTER 2
1. This is a video camera type CCD. Charge storage density =
capacity/area = 341 electrons per square micron. Readout noise
at 14 MHz = 120 e-. Dynamic range = capacity/(readout noise) =
167. Dark current at 0C = 334 e-/sec. The wells fill to
(flux*QE*exposure time)/capacity = 58% during the 16.7 msec.
exposure time, while a 29 msec exposure would saturate the
wells. Photon noise level is N = Flux  QE + DC t = 109 e- at 25C.
p
b
g
Total noise level is the root-sum-square of photon and readout
noise = 162 e-. SNR = (flux*QE*exposure time)/(total noise) =
72. (See MathCAD file HW_02-01.MCD)
2, This is the TH7883-PM chip. Charge storage density = 331 e/2. Dynamic range = 10,000 at 135kHz, and 20,000 at 47.5kHz.
Dark current at 0C = 1,177 e-/sec. Incident light flux of 10,000
photons per second per pixel => 46% of capacity in 20 sec. 43.75
sec. exposure would saturate the wells. At a 50Khz readout rate
and 0C, a 29.1 sec. exposure time would make its SNR 300, and
the wells would fill to 67%. (See MathCAD file HW_02-02.MCD)
3. This is the Kodak KAF-1400 chip. Charge storage density = 973
e-/2. Dynamic range = 4,000 at 401.5kHz. Dark current at 25C =
36 e-/sec. Incident light flux of 2,000 photons per second per
pixel => 54.9 sec. exposure would saturate the wells. At a
400Khz readout rate and 0C, a 49 sec. exposure time would make
its SNR 200, and the wells would fill to 89%. A 12.3 sec.
exposure time would make its SNR 100, and the wells would fill
to 22%. (See MathCAD file HW_02-03.MCD)
4. This is the Kodak KAF-4200 chip. Its well capacity is 85,000
electrons. Its dynamic range is 6538. Its dark current at 25C is
45 e-/sec. If the incident light flux is 20,000 photons per sec.
per pixel, an exposure time of 9.44 sec would saturate the
wells. At a 400Khz readout rate and -30C, a 2.53 sec. exposure
time makes its SNR = 150. The filling percentage of the wells at
this exposure time is 27%. Its total noise level is 151 e-.
5. This is the Kodak KAF-6300 chip. A 1591 kHz readout rate
gives it a dynamic range of 5,000. This chip’s dark current at
25C is 91 e-/sec. If the incident light flux is 8,000 photons
per second per pixel, a 23.6 sec. exposure saturates the wells.
At a 1 MHz readout rate and -30C, an 18.3 sec. exposure time
makes its SNR = 256. At this exposure time the wells fill to
77.5%.
Part One
3/21
Digital Image Processing
Solution Manual
6. Readout noise will be predominant at low illumination, low
temperature, and short exposure time.
Dark current noise will be predominant at low illumination, high
temperature, and long exposure time.
Photon noise will be predominant at high illumination, high
temperature, and long exposure time.
7. You can inscribe a 25/2 = 17.678mm square in a 25mm diameter
circle, and there will be 17,678/35 = 505 pixels per row. The
diagonal of a 640x480 rectangle is 800 units of pixel spacing.
Thus pixel spacing = 25mm/800 = 31 microns. The 4:3 scan area
will be 20mm by 15mm.
Projects
1. Assuming Gaussian noise, the RMS noise level is half the
width of the peak of the histogram at 61% amplitude. Account for
unflatness of the test image by using background subtraction
(Sec. 7.3.2.1). Use long integration or image averaging (Sec.
7.3.1) to get a relatively noise-free background image. Under
dark conditions you have mainly readout noise, with a little
photon noise due to dark current. Under light conditions total
noise is the RMS of photon and readout noise. (See MathCAD file
HW_02-01.MCD)
Np =
bFlux  QE + DCgt
e
N t = N r2 + N p2
SNR =
Flux  QE  te
Nt
(1)
2. Dark, cold, short exposure  readout noise. Dark, warm, long
exposure  readout noise + photon noise due to dark current.
Bright, cold, long exposure  readout noise + photon noise.
3. To estimate noise level, see Proj. 1. For resolution,
differentiate the profile of a sharp edge to get the line spread
function and measure its width (see Sec. 15.2.1, 16.6.1.4). The
photometric response plot is gray level vs. brightness.
Part One
4/21
Digital Image Processing
Solution Manual
CHAPTER 3
Problems
1. For one-pixel-wide black and white lines the intensity is
1.341 at the center of pixels in the lines, and 0.454 at pixels
between them, for a modulation factor of 66.1%.
For a one-pixel checkerboard it is 1.117 at pixel center and
0.679 at mid-diagonal, for a modulation factor of 39.2%.
(See MathCAD file HW_03-01.MCD)
2. From Fig.3-8, 1.92R, and from Fig. 3-10, 1.98R, so use 1.98R
pixel spacing. (See MathCAD file HW_03-02.MCD)
3. Spot spacing values of (a) 0.85 would produce borders between
high-intensity pixels, (b) 1.0 would produce flat fields, and
(c) 1.15 would leave gaps between high-intensity pixels. Tell
him/her to set horizontal and vertical spot spacing exactly
equal to spot width and verify it with a magnifying glass on a
high-intensity flat field.
Projects
1. Bilinear should take about twice as long as replication, and
sinc about 2-4 times that. Replication will show pixels
microscopically, but sinc will be noticeably better than
bilinear only for some image content. Graphics images will
suffer most visibly from pixelation, due to the sharp edges. See
Sec. 3.2.7 for a discussion of the effects of a Gaussian display
spot. You can also try larger magnification factors (3x, 4x).
2. Use the discussion in Sec. 3.2.6, particularly Figures 3-8
and 3-10, to estimate the spot spacing. On color displays the
situation is complicated by the phosphor pattern.
3. You are on your own on this one.
Part One
5/21
Digital Image Processing
Solution Manual
CHAPTER 4
Problems
1. The student can choose the number of menu levels. Too many
levels can make it hard to navigate and tiresome in high-volume
operation. Three levels, or possibly four for some functions,
are suitable. Here is a simple two-level structure:
Import Image: Downlink, TCPIP, Dialup, Disk
Process Image: Brightness, Contrast, Histogram Equalize,
Subtract background, Average, Rotate, Magnify
Export Image: Downlink, TCPIP, Dialup, Disk, Printer
2. Use Fig. 4-4 as a guide but adapt it for the IC chip
inspection problem. Justify why each box is there.
Projects
1. The emphasis should be on flexibility and ease of use.
Minimize the number of keystrokes or mouse clicks required to do
each task. Name the menu items in terms familiar to the users.
Use meaningful icons, probably obtained from the field of the
users. Make it intuitive and obvious, not needing separate
documentation.
2. Get comments on (1) ease of use, (2) ease of learning, (3)
flexibility, (4) obviousness, (5) natural, intuitive feel. Also
judge the degree to which the user is “having fun” using it, and
how soon it would become boring.
3. This is like a coloring book project in kindergarten, but it
uses the “flood fill” tool in a paint program. You first must
fill any gaps in the digitized drawing. One of the 16 colors
(probably black) must be reserved for the lines. The emphasis
should be on the choices of the 16 colors. Each should serve a
stated purpose in coloring the image. If less than 16 will do
the job, then so much the better.
4. Select a simple but interesting software package. This
project should include both program design and code
documentation (Sec. 4.4.7). A good statement of the purpose of
the software (application problem and approach to solution) and
the typical user is needed. The order of presentation is
important, generally following either top-down, bottom-up or
process-flow direction, and with any special terms defined.
5. Prepare a detailed outline for a user documentation package
for an existing software package. Select a simple but
interesting software package. This project should include an
operator’s manual, reference manual and on-line help (Sec.
4.4.7). A good statement of the purpose of the software
Part One
6/21
Digital Image Processing
Solution Manual
(application problem and approach to solution) and the typical
user is needed. Orient the user to the operational approach used
in the software package. The order of presentation is important,
building the user’s knowledge gradually, with all special terms
defined.
6. Pick easy formats for this project (unless you really need
the program). Existing low-level code may be available as a
starting point. The emphasis should be on the interface design
and possibly the user documentation. Let the students use and
grade each other’s programs in terms of usability.
Part One
7/21
Digital Image Processing
Solution Manual
CHAPTER 5
Problems
1. See below:
1
1
0
1
0
0
64
128
192
256
0
0
64
(a)
128
192
256
0
192
256
192
256
192
256
1
0
128
128
(c)
1
64
64
(b)
1
0
0
0
0
64
(d)
128
192
(e)
256
0
64
128
(f)
2. Same as Problem 1 if the man's hair and skin are light.
3. Put the threshold gray level at 100 (anywhere between 75 and
120). The area = 40 mm2, and the IOD = A*MGL = 40*180 = 7200.
4. Diameter of ball = 230 mm. Area of ball = 41,548 mm2. From the
histogram, number of pixels in ball = 3860. Area of a pixel =
10.76 mm2. Pixel spacing = 3.28 mm.
Projects
1, 2. See Sec. 5.1.1.
3. See Fig. 5-2, Sec. 5.2.2.
4. See Fig. 5-4, Sec. 5.2.2.
5. The width of the histogram (Max - Min gray level) is a
measure of image contrast. Highest contrast (widest histogram)
is obtained when the image is in focus.
6. See Eq. 6, and Sec. 5.2.3.
Part One
8/21
Digital Image Processing
Solution Manual
CHAPTER 6
Problems
1.
Solve Eq. (2) for a = (240-16)/(155-23) = 1.697;
b = 16 - 23a = -23.03 and use Eq. (16).
1
256
1
192
0.5
128
0.5
64
0
0
64
128
192
256
0
0
64
128
192
0
256
0
64
128
192
256
256
192
128
64
0
2. Use a = Dm/(B-A), and b = -aA
0
64
128
192
256
3. Substitute tanh for sin in Eq. (4), (23), and (24) and sech2
for cos in Eq. (24). The operation expands the midrange. It’s a
better problem if you use  = 1. (See HW_06a.MCD)
5
64
5
48
32
16
0
0
16
32
48
64
0
0
16
H1(D)
32
48
64
0
0
16
f(D)
32
48
64
H2(D)
4. Substitute sinh for sin in Eq. (4), (23), and (24) and cosh
for cos in Eq. (24). The operation compresses the midrange. It’s
a better problem if Dmax = 63 and  = 1. (See HW_06b.MCD)
5
64
48
5
32
16
0
0
16
32
H1(D)
Part One
48
64
0
0
16
32
f(D)
9/21
48
64
0
0
16
32
H2(D)
48
64
Digital Image Processing
Solution Manual
5. Note: H(D) = 1,704sin(D/255). Dm = 255 and A = 276,624.
f(D) = 1,704[Dm2/A][1 - cos(D/Dm)]
df/dD = 1,704(Dm/A)sin[D/Dm]
f-1(D) = (Dm/)acos[1 - (A/1,704Dm2)D]
2000
256
2000
192
1000
128
1000
64
0
0
64
128
192
256
0
0
64
128
H1(D)
192
0
256
0
64
f(D)
128
192
256
H2(D)
F(D) = [4D3/Dm2 - 3D4/Dm3]
6. Let Dm = 63, Ao = 1.
2
64
48
1
32
16
0
0
16
32
48
0
64
0
16
H1(D)
32
48
64
f(D)
7. For each image, the histogram’s CDF is
bg
FG IJ
H K
C
x
P x =
 + 1 Dm
 +1
FG IJ
H K
C
x
−
 +  + 1 Dm
1.5
 +  +1
64
48
1
H1( x )
f1( x ) 32
0.5
0
16
0
16
32
48
0
64
0
16
x
32
48
64
48
64
x
2
64
48
H2( x ) 1
f2( x ) 32
16
0
0
16
32
48
0
64
x
Part One
0
16
32
x
10/21
Digital Image Processing
Solution Manual
where  = 1,  = 1, C = 6 for the first image,
and  = 2,  = 1, C = 12 for the second image.
(a) The histogram-flattening point operation is f1(x) = DmP1(x).
(b) The histogram-flattening point operation is f2(x) = DmP2(x).
(c) To transform the second image, use f(x) = P1-1[P2(x)].
(d) To transform the first image, use f(x) = P2-1[P1(x)].
Don’t bother with the FBI. Get the tabloids bidding against each
other.
bg
−
x2
2 2
where
8. For each image, the histogram’s CDF is P x = 1 − e
 = 16 for the first image, and  = 24 for the second image.
(a) The histogram-flattening point operation is f1(x) = DmP1(x).
(b) The histogram-flattening point operation is f2(x) = DmP2(x).
(c) To transform the second image, use f(x) = P1-1[P2(x)].
(d) To transform the first image, use f(x) = P2-1[P1(x)].
2.5
64
2
48
1.5
H1( x )
f1( x ) 32
1
16
0.5
0
0
16
32
48
0
64
0
16
32
x
H2( x )
2
64
1.5
48
1
f2( x ) 32
0.5
16
0
0
16
32
48
64
48
64
x
48
0
64
0
16
32
x
x
bg
FG
H
9. For each image, the histogram’s CDF is P x = 1 − 1 +
IJ e
K
x
−
x

where  = 8 for the first image, and  = 12 for the second image.
(a) The histogram-flattening point operation is f1(x) = DmP1(x).
(b) The histogram-flattening point operation is f2(x) = DmP2(x).
(c) To transform the second image, use f(x) = P1-1[P2(x)].
(d) To transform the first image, use f(x) = P2-1[P1(x)].
Part One
11/21
Digital Image Processing
Solution Manual
3
64
48
2
H1( x )
f1( x ) 32
1
0
16
0
16
32
48
0
64
0
16
32
x
48
64
48
64
x
2
64
48
H2( x ) 1
f2( x ) 32
16
0
0
16
32
48
0
64
0
16
32
x
x
bg
10. The inverse point operation is g x =
Dm

LM
N
cos−1 1 − 2
x
Dm
64
64
64
48
48
48
f( x ) 32
g( x ) 32
f( g( x ) ) 32
16
16
16
0
0
16
32
48
64
0
0
16
32
x
48
0
64
OP
Q
0
16
x
32
48
64
x
11. Assume D = Dm  OD = 0, and D = 0  OD = .
bg
Then f D = − Dm log
64
LM D OP
ND Q
48
m
f( x ) 32
16
0
0
16
32
48
64
x
12. Here brightness is proportional to gray level raised to the
gamma power. This can be modeled as an ideal display preceded by
a point operation with GST
F xI
f b xg = D G J
HD K
m

.
m
To change the gamma from 1 = 0.8 to 2 = 1.4 we can concatenate
two point ops, the first of which undoes the 0.8 gamma (leaving
a linear display), and the second applies the 1.4 gamma. Thus
Part One
12/21
Digital Image Processing
Solution Manual
f4(x) = f2(f3(x)), where f3 has a gamma of 3 = 1/0.8 = 1.25, and
f2 has a gamma of 2 = 1.4. This f4(x) is actually a single point
op having a gamma of 4 = 1.4/0.8 = 1.75.
64
64
64
48
48
48
f1( x ) 32
f3( x ) 32
f4( x ) 32
16
16
16
0
0
16
32
48
0
64
0
16
32
48
x
x
 = 0.8
 = 1.4
0
64
0
16
32
48
64
x
 = 1.75
13. Substitute tan for sin in Eq. (23) and (24) and sec2 for cos
in Eq. (24).    will move the left-hand peak to 15. (See
HW_06.MCD)
5
64
5
48
32
16
0
0
16
32
48
0
64
0
16
32
H1(D)
48
64
0
0
16
f(D)
5
32
H2(D)
64
48
32
16
0
0
16
32
48
0
64
0
16
32
48
finv(D)
f'(D)
Projects
1. See Problem 2.
2, 3. See Problems 3,4, Eq. 4,5.
4. This is histogram equalization. See Sec. 6.3.1.
5. This is histogram matching to a Gaussian histogram.
See Sec. 6.3.2.
6. This is histogram matching to a given histogram.
See Sec. 6.3.2.
Part One
13/21
64
48
64
Digital Image Processing
Solution Manual
CHAPTER 7
Problems
1. February:
[0 500 8000 500 100 100 200 300 200 100 0 0 0 0 0 0]
Area = 900, MGL = 5, IOD = 5*900 = 4,500
October:
[0 500 8000 500 100 0 0 100 200 300 200 100 0 0 0 0]
Area = 900, MGL = 7, IOD = 7*900 = 6,300
It’s the same size but getting denser. Better cut it out.
2. April:
[0 0 0 500 5000 500 200 100 100 200 300 200 100 0 0 0]
Area = 900, MGL = 6, IOD = 6*900 = 5,400
November:
[0 0 0 500 5250 500 200 100 100 150 200 150 50 0 0 0]
Area = 650, MGL = 6, IOD = 6*650 = 3,900
It’s getting smaller and less dense. Better send him home.
3. The first image is constant with gray level 3. It will just
shift the other histogram up by three positions.
[0 0 0 600 1000 1800 2500 1900 1100 800 200 0 0 0 0 0]
4. Diskette 2 has the balls since its histogram shows more
pixels at higher gray levels. Area = 6,100 pixels. The only
difference between the two histograms is that 100 pixels moved
from 2 to 12 (increase by 10) and 100 moved from 4 to 13
(increase by 9). Thus in the difference image only these 200
pixels will be nonzero.
Diskette 1:
[0 100 400 700 800 600 500 600 500 400 400 600 400 100 0 0]
Diskette 2:
[0 100 300 700 700 600 500 600 500 400 400 600 500 200 0 0]
Difference image:
[5900 0 0 0 0 0 0 0 0 100 100 0 0 0 0 0]
800
800
600
600
H1 400
i
H2 400
i
200
200
0
0
5
10
i
Part One
15
0
6000
H3 3000
i
0
5
10
i
14/21
15
0
0
5
10
i
15
Digital Image Processing
Solution Manual
4. The first one could correspond to a gradient magnitude image
because it is symmetrical.
800
800
600
600
H1 400
i
H2 400
i
200
200
0
0
5
10
0
15
i
0
5
10
15
i
Projects
1, 2. These work best if the background behind the subjects is
smooth, devoid of detail.
3. This demonstrates the need for exact registration.
4. This demonstrates the need for repeatable illumination.
Histogram matching might help.
5. Each moving object will often produce adjacent dark and light
spots (Fig. 7-4). Good registration is required to keep edge
artifacts away.
6. Estimate the positions of the centers of the two images of
the object and compute the travel distance in pixels. Multiply
by the pixel spacing to get the distance. Divide by the frame
interval to get velocity.
7. Average four frames (4 = 2). Movement will cause blurring.
8. Develop (or obtain) a program that can compute the gradient
magnitude image and use it to convert a photograph of a friend
into a cartoon (black-on-white line drawing). Invert the
gradient magnitude image to get dark lines where the edges are,
and use a linear stretch to make a line drawing.
9. Solid colored objects should have constant gray level in the
ratio image, except for noise, if the system is linear.
Monochrome (black, white, gray) objects should have a Red/Green
ratio of 1.0 if the system is properly calibrated. Use a point
operation to make the monochrome objects have the same gray
level in both images. If the histograms are dominated by
monochrome objects, you can use histogram matching, otherwise
not. Poor calibration will cause nonuniformity of gray level
(shading) inside colored objects, and motion will create edge
effects.
Part One
15/21
Digital Image Processing
Solution Manual
CHAPTER 8
Problems
1. Fnn(221.3,396.7) = 52, Fbi(221.3,396.7) = 40.87
Fbi(x,y) = 18 + (45-18)x + (52-18)y + (36-52-45+18)xy
2. Fnn(109.27,775.44) = 113, Fbi(109.27,775.44) = 109.32
Fbi(x,y) = 113 + (105-113)x + (109-113)y + (103-109-105+113)xy
3. Multiply out Eq. (16) and get
a(x,y) = xcos() - ysin() - x0cos() + y0sin() + x0
b(x,y) = xsin() + ycos() - x0sin() - y0cos() + y0
where  = 33 deg, x0 = 207, y0 = 421
4. Translate 13,-27; Scale 100%; Rotate 0 degrees (See Prob. 3).
5. Translate 27,31; Scale 82%; Rotate 0 degrees.
6. Translate 10,-10; Scale 120%; Rotate 10 degrees.
7. Let the corners of the field, (62,
85), (77, 128), (125, 134), and (140,
106), map to (x1,y1), (x1,y2), (x2,y2)
and (x2,y1), where x2-x1 = y2-y1 (i.e.,
a square). For example, let x1 = 70, x2
= 130, y1 = 80, y2 = 140. Let a(x,y)
and b(x,y) [Eq. (1)] both be bilinear
[Eq. (2)]. Solve for the four
coefficients of each.
150
100
50
50
100
150
For a(x,y) the coefficients are
b140 − 62g y − b125 − 77g y
b x − x gb y − y g
b125 − 140g − b77 − 62g
c=
b x − x gb y − y g
a=
2
2
2
1
1
1
2
2
b=
2
2
1
1
b77 − 62gx − b125 − 140gx
b x − x gb y − y g
d=
1
1
2
1
62 x2 y2 − 77 x2 y1 − 140 x1 y2 + 125x1 y1
x2 − x1 y2 − y1
b
gb
g
or a = 1.967, b = 0.833, c = -0.00833, d = -97.67. Similarly for
b(x,y).
Part One
16/21
Digital Image Processing
Solution Manual
8. This is a onedimensional warp since
tan[2] = dx/r
P
x+dx
the y-coordinates are
dx
not changed. It is

one form of projecting
r

a cylinder onto a

x
R
plane. For simplicity,
first translate the

sin[] = x/R
R
d
r
image so that the
x
cos[] = d/R

origin of the image is
d
r
on the centerline of
R
the cylinder in the
image, and place the projection plane tangent to the cylinder at
that point.
The geometric op moves gray levels from x to x + dx. The surface
normal line runs from the center to the surface of the cylinder.
Pixel rays coming in parallel to the z axis intersect the plane
at x and make an angle  with the surface normal where they hit
the cylinder. They reflect off at an equal angle on the opposite
side of the surface normal and intersect the plane at x + dx.  =
asin[x/R] where R is the radius of the cylinder, and dx = R[1cos()]tan(2). Notice that -45 <  < 45 covers everything on
the camera side of the cylinder. Assume the villain is here.
Note that 45 < || < 90 shows almost everything else. For a
more challenging problem account for the distance to the camera.
9. This is mapping a sphere onto a plane. It is similar to
Problem 8 except that it is two-dimensional. For simplicity,
first translate the image so that the origin of the image is at
the center of the ball in the image and place the projection
plane tangent to the sphere at that point. For a more
challenging problem, account for the distance to the camera.
10. The point p moves to p’ as the
cylinder unrolls, so the geometric
op moves the gray level at x to
x+dx, which is the arc length from
the origin to p. For a more
challenging problem account for
the distance of the camera above
the arm.
p'
p
R

dx
x
x+dx = R
sin[] = x/R
11. This is the same as Problem 3,
except that x0 = 120, y0 = 210, and  = 60 deg.
12. Let (x0,y0) = (64,120), 1 = -30 deg, 2 = 30 deg. Sx = 1.30,
Sy = 0.85. Then
Part One
17/21
Digital Image Processing
LMab x, ygOP L1
MMbb x, ygPP = MM0
N 1 Q MN0
OPLM b g
PPMM b g
QN
0 x0 cos  1
1 y0 sin  1
0 1
0
Solution Manual
b g 0OPLMS
b g 0PM 0
1PQ MN 0
− sin  1
cos  1
0
x
0
Sy
0
OPLM b g
PPMM b g
QN
0 cos  2
0 sin  2
1
0
b g 0OPLM1
b g 0PM0
1PQ MN0
− sin  2
cos  2
0
OPLM OP
PPMM PP
QN Q
0 − x0 x
1 − y0 y
0 1 1
13. Substitute Eq. (17) into Eq. (14), collect terms over a
common denominator of cos() and use sin2 + cos2 = 1.
Note: Eq. (14) is b(x,y) = xsin() + ycos()
PROJECTS
1, 2, 3. See Ref. 20,21 and <http://www.phoenix.net/~castlman/>
4. Make sure the image has plenty of horizontal and vertical
edges in it. Use their intersections as fiducial marks.
5. Use the image of the grid in the fun house mirror to
determine the geometric operation that is performed by the
mirror, then use the inverse operation on the image of the
friend.
6. Use the image of the grid in the fun house mirror to
determine the geometric operation, then use that same operation
on the image of the friend.
7. Use the intersections of vertical and horizontal edges of the
building as fiducial marks.
8. Make the interface so that it allows you to specify arbitrary
points in the input image and the position to which they will
move. This allows you to bob noses, lift eyes, etc.
9. Make the interface so that it allows you to specify arbitrary
points in the input image and the position to which they will
move in a second image (the famous person).
10. See Problem 10.
11. See Sec. 8.3.1.
12. Assume cos() = 1 or sin() = 0
in Eq. (13) and (14).
13. Use an available morphing program and define the control
points.
14. Control points define piecewise linear approximations to
curves. Closer spacing is required in areas of high curvature.
Put control points at corners.
Part One
18/21
Digital Image Processing
Solution Manual
ERRATA
Here are the known errors and inconsistencies that survived
into the second and later printings of the book.
Matrix transpose is indicated by superscript t in Chapters 1 16, and as superscript T in the remainder.
There is a picture of the author somewhere in Chapter 12.
p. 34, Problems 1-5:
Dynamic range
= capacity/readout noise = C/Nr
Photon noise level:
Np = Sqrt[(flux*QE + DC)te]
Total noise:
Nt = Sqrt[Np2 + Nr2]
SNR = (flux*QE*te)/Nt
p. 79, Eq. 21: middle term should have a minus sign.
p. 86, Eq. 4: Zero to the right of the equal sign should be
deleted; pound sign should be deleted
p. 103, Eq. (12) and (13): the 2y2 term should be positive.
p. 152, Eq. (43):
p. 157, Fig. 9-9: The 2- should be -2.
p. 173, Eq. 9: First exponent should have an s2.
p. 179, Eq. 35: Plus sign should be minus.
p. 162, Eq. (66), 3rd term: put absolute value bars around a.
p. 173, Eq. (9): s should be squared in the exponent
p. 179, Eq. (35): Plus sign should be minus.
p. 218, Eq. (21): lim goes in front of integral.
p. 288, Eq. (30): Last C should be CT
p. 322, Eq. (35): Left side should be h0(it)
p. 324, Eq. (39): Right side, 2nd and 3rd terms should have ½
p. 324, Eq. (40): Right side, 2nd and 3rd terms should have ½
p. 324, Eq. (41): Right side, 2nd and 3rd terms should have ½
p. 325, Eq. (45): Right side, 2nd and 3rd terms should have ½
p. 325, Eq. (46): Right side, 2nd and 3rd terms should have ½
p. 328, Fig. 14-20: Left-hand filters h0() and h1() should have
negative arguments.
p. 328, Fig. 14-21: Filters h0() and h1() should have negative
arguments.
p. 331, Figure 14-23: The h's should be eta's.
p. 339, Figure 14-30: This is the Haar transform.
h0=[a,a],
h1=[-a,a], a=sqrt(2)/2.
p. 343, Table 14-2: Title should refer to Figure 14-34.
p. 359, Eq. 17: Last minus sign should be plus.
p. 505, Eq. (48):
p. 559, Third line below Eq. (13): "rows" should be "columns".
p. 578, Eq. (50): Second denominator, plus sign should be minus.
Part One
19/21
Digital Image Processing
Solution Manual
p. 652: Chain code, boundary, 479, 496, 507.
p. 645: Convolution (cont) theorem, 182, 256, 290.
Here are correct versions of some of the equations.
Part One
20/21
Digital Image Processing
Solution Manual
Here are the known errors and inconsistencies in the first
printing of the book (August, 1995).
Matrix transpose is indicated by superscript t in
Chapters 1 - 16, and as superscript T in the remainder.
p. xvii: Steve Rosser's name is misspelled.
p. 32, Fig. 2-18: capital L should be lower case.
p. 34, Probs. 1-5: Dynamic range = capacity/readout noise = C/Nr
Photon noise level: Np = Sqrt[(flux*QE + DC)te]
Total noise: Nt = Sqrt[Np2 + Nr2]
SNR = (flux*QE*te)/Nt
p. 42, line 2: "21 radii" should be "2 radii."
p. 97, Problems 3 and 4: Use Dm = 63,  = 1.0
p. 97, Problem 5: x should be D.
p. 120, Eq. (14): b(x,y) = x*sin() + y*cos()
p. 138: Problem 2, should be F(109.27,775.44) for interpolation,
but you can extrapolate with the problem as written.
p. 202: Fig. 10-10 (e) is negative.
p. 215: Fig. 11-11 is clipped at the top.
p. 250: Problem 1. Prove Eq. (48). Problems 3, 4. x, not s.
p. 251: Problem 6. Drop the 10 in s(t) for a better problem.
and
(4)
p. 282:
T−1 = Tt
TTt = Tt T = I
p. 292, line 1: "sequences" should be "sequencies."
p. 343, Tab. 14-2: All three synthesis filters should have wavy
hats.
p. 370:
(48)
 = 122
.  di a  122
. f #
−1
p. 557:
(10)
x = C y −b
p. 643, Fig. A3-1: Axes should be labeled x1 and x2.
p. 645, Fig. A3-2: Axes should be labeled x1 and x2.
Part One
21/21
Download