Assignment From Book
Assignment From Book
Assignment From Book
Sol:
From the geometry of Fig. 2.3, (7mm)/(35mm) = (z)/(500mm), or z = 100mm.
So the target size is 100 mm on the side. We have a total of 1024 elements per
line, so the resolution of 1 line is 1024/100 = 10 elements/mm. For line pairs we
divide by 2, giving an answer of 5 lp/mm.
2.9
A common measure of transmission for digital data is the baud rate, defined as the number
of bits transmitted per second. Generally, transmission is accomplished in packets consisting
of a start bit, a byte (8 bits) of information, and a stop bit.
Using these facts, answer the following:
(a) How many minutes would it take to transmit a 1024 x 1024 image with 256 intensity
levels using a 56K baud modem?
(b) What would the time be at 3000K baud, a representative medium speed of a phone DSL
(Digital Subscriber Line) connection?
Sol:
(a) The total amount of data (including the start and stop bit) in an 8-bit, 1024×
1024 image, is (1024)2×[8+2] bits. The total time required to transmit this image
over a 56K baud link is (1024)2 × [8 + 2]/56000 = 187.25 sec or about 3.1 min.
(b) At 3000K this time goes down to about 3.5 sec.
2.10
High-definition television (HDTV) generates images with 1125 horizontal TV lines interlaced
(where every other line is painted on the tube face in each of two fields, each field being
1/60th of a second in duration). The width-to-height aspect ratio of the images is 16:9. The
fact that the number of horizontal lines is fixed determines the vertical resolution of the
images. A company has designed an image capture system that generates digital images
from HDTV images. The resolution of each TV (horizontal) line in their system is in
proportion to vertical resolution, with the proportion being the width-to-height ratio of the
images. Each pixel in the color image has 24 bits of intensity resolution, 8 bits each for a red,
a green, and a blue image. These three “primary” images form a color image. How many bits
would it take to store a 2-hour HDTV movie?
Sol:
The width-to-height ratio is 16/9 and the resolution in the vertical direction is 1125 lines (or,
what is the same thing, 1125 pixels in the vertical direction). It is given that the resolution in
the horizontal direction is in the 16/9 proportion, so the resolution in the horizontal
direction is (1125)×(16/9) = 2000 pixels per line. The system “paints” a full 1125×2000, 8-bit
image every 1/30 sec for each of the red, green, and blue component images. There are
7200 sec in two hours, so the total digital data generated in this time interval is
(1125)(2000)(8)(30)(3)(7200) = 1.166 × 1013 bits, or 1.458 × 1012 bytes (i.e., about 1.5
terabytes)
2.11
Consider the two image subsets, S1 and S2, shown in the following figure. For V ={1},
determine whether these two subsets are (a) 4-adjacent, (b) 8-adjacent, or (c) m-adjacent.
Sol:
Let p and q be as shown in the figure above (Red shows p and Green shows q). Then, (a) S1
and S2 are not 4-connected because q is not in the set N4(p); (b) S1 and S2 are 8-connected
because q is in the set N8(p); (c) S1 and S2 are m-connected because (i) q is in ND(p), and (ii)
the set N4(p) ∩ N4(q) is empty.
2.12
Develop an algorithm for converting a one-pixel-thick 8-path to a 4-path.
Sol:
The solution of this problem consists of defining all possible neighborhood shapes to go
from a diagonal segment to a corresponding 4-connected segments as Fig. P2.12 illustrates.
The algorithm then simply looks for the appropriate match every time a diagonal segments
is encountered in the boundary.
2.13
Develop an algorithm for converting a one-pixel-thick m-path to a 4-path.
Sol:
The solution to this problem is the same as for Problem 2.12 because converting from an m-
connected path to a 4-connected path simply involves detecting diagonal segments and
converting them to the appropriate 4-connected segment.
2.14
Refer to the discussion at the end of Section 2.5.2, where we defined the background as
(Ru)c, the complement of the union of all the regions in an image. In some applications, it is
advantageous to define the background as the subset of pixels (Ru)c, that are not region
hole pixels (informally, think of holes as sets of background pixels surrounded by region
pixels). How would you modify the definition to exclude hole pixels from (Ru)c? An answer
such as “the background is the subset of pixels of (Ru)c that are not hole pixels” is not
acceptable. (Hint: Use the concept of connectivity.)
Sol:
The difference between the pixels in the background that are holes and pixels that are not
holes is than no paths exist between hole pixels and the boundary of the image. So, the
definition could be restated as follows: The subset of pixels of (Ru)c that are connected to
the border of the image is called the background. All other pixels of (Ru)c are called hole
pixels.
2.15
Sol:
(a) When V = {0,1}, 4-path does not exist between p and q because it is impossible to get
from p to q by traveling along points that are both 4-adjacent and also have values from V .
Figure (a) shows this condition; it is not possible to get to q. The shortest 8-path is shown in
Fig. (b); its length is 4. The length of the shortest m- path (shown dashed) is 5. Both of these
shortest paths are unique in this case.
(b) One possibility for the shortest 4-path when V = {1,2} is shown in Fig. (c); its length is 6. It
is easily verified that another 4-path of the same length exists between p and q. One
possibility for the shortest 8-path (it is not unique) is shown in Fig. (d); its length is 4. The
length of a shortest m-path (shown dashed) is 6. This path is not unique.
2.17
Repeat Problem 2.16 for the D8 distance.
Sol:
(a) The D8 distance between p and q is
Sol:
The median, ζ, of a set of numbers is such that half the values in the set are below ζ and the
other half are above it. A simple example will suffice to show that Eq. (2.6-1) is violated by
the median operator. Let S1 = {1,−2,3}, S2 = {4,5,6}, and a = b = 1. In this case H is the
median operator. We then have H(S1 +S2) =median{5,3,9} = 5, where it is understood that
S1 +S2 is the array sum of S1 and S2. Next, we compute H(S1) = median{1,−2,3} = 1 and
H(S2) = median{4,5,6} = 5. Then, because H(aS1 + bS2) ≠ aH(S1) + bH(S2), it follows that Eq.
(2.6-1) is violated and the median is a nonlinear operator.
2.23
(a) With reference to Fig. 2.31, sketch the set (A ∩ B) ∪ (A ∪ B)c.
(b) Give expressions for the sets shown shaded in the following figure in terms of sets A, B,
and C. The shaded areas in each figure constitute one set, so give one expression for each of
the three figures.
Sol:
(a)
(b) With reference to the sets in the problem statement, the answers are, from left to right,
(A ∩ B ∩C) − (B ∩C);
(A ∩ B ∩C) ∪ (A ∩C) ∪ (A ∩ B);