









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This solution manual is for problems related Digital Image processing course. This was recommended by Prof. Anwar Malik at Bengal Engineering and Science University. It includes: Geodesic, Dilation, Complement, Noise, Spikes, Amplitude, Shape, Element, Image, Border, Pixel
Typology: Exercises
1 / 15
This page cannot be seen from the preview
Don't miss anything!










(a) Let R 1 and R 2 denote the regions whose pixel intensities are greater than T and less or equal to T , respectively. The threshold T is simply an intensity value, so it gets mapped by the transformation function to the value T ′^ = 1 − T. Values in R 1 are mapped to R 1 ′ and values in R 2 are mapped to R 2 ′. The important thing is that all values in R 1 ′ are below T ′^ and all values in R ′ 2 are equal to or above T ′. The sense of the inequalities has been reversed, but the separability of the intensities in the two regions has been preserved. (b) The solution in (a) is a special case of a more general problem. A thresh- old is simply a location in the intensity scale. Any transformation function that preserves the order of intensities will preserve the separabiliy established by the threshold. Thus, any monotonic function (increasing or decreasing) will pre- serve this order. The value of the new threshold is simply the old threshold pro- cessed with the transformation function.
(a) The first column would be black and all other columns would be white. The reason: A point in the segmented image is set to 1 if the value of the image at that point exceeds b at that point. But b = 0, so all points in the image that are greater than 0 will be set to 1 and all other points would be set to 0. But the only points in the image that do not exceed 0 are the points that are 0, which are the points in the first column.
The region splitting is shown in Fig. P10.39(a). The corresponding quadtree is shown in Fig. P10.39(b).
(a) The elements of T [ n ] are the coordinates of points in the image below the plane g ( x , y ) = n , where n is an integer that represents a given step in the execu- tion of the algorithm. Because n never decreases, the set of elements in T [ n − 1 ] is a subset of the elements in T [ n ]. In addition, we note that all the points below the plane g ( x , y ) = n − 1 are also below the plane g ( x , y ) = n , so the elements of T [ n ] are never replaced. Similarly, C (^) n ( M (^) i ) is formed by the intersection of C ( M (^) i ) and T [ n ], where C ( M (^) i ) (whose elements never change) is the set of coor- dinates of all points in the catchment basin associated with regional minimum M (^) i. Because the elements of C ( M (^) i ) never change, and the elements of T [ n ] are
1 11 12 13 14 2 21 22 23 24
3 31 32 33 34 321 322 323 324
4 41 42 43 44 411 412 413 414
1 11 12
13 14
2 21 22
23 24
3
31
32
33 34 4
41 42
43 44
321 322
323 324
411 412
413 414
Figure P10.
never replaced, it follows that the elements in C (^) n ( M (^) i ) are never replaced either. In addition, we see that C (^) n − 1 ( M (^) i ) ⊆ C (^) n ( M (^) i ).
The first step in the application of the watershed segmentation algorithm is to build a dam of height max + 1 to prevent the rising water from running off the ends of the function, as shown in Fig. P10.43(b). For an image function we would build a box of height max + 1 around its border. The algorithm is initialized by setting C [ 1 ] = T [ 1 ]. In this case, T [ 1 ] = g ( 2 ) , as shown in Fig. P10.43(c) (note the water level). There is only one connected component in this case: Q [ 1 ] = q 1 = { g ( 2 )}.
Figure P10.
any location is the absolute difference between the reference and the new im- age, it is easy to see that as the object enters areas that are background in the reference image, the absolute difference will change from zero to nonzero at the new area occupied by the moving object. Thus, as long as the object moves, the dimension of the absolute ADI will grow.
Recall that velocity is a vector, whose magnitude is speed. Function g (^) x is a one-dimensional "record" of the position of the moving object as a function of time (frame rate). The value of velocity (speed) is determined by taking the first derivative of this function. To determine whether velocity is positive or negative at a specific time, n , we compute the instantaneous acceleration (rate of change of speed) at that point; that is we compute the second derivate of g (^) x. Viewed another way, we determine direction by computing the derivative of the deriva- tive of g (^) x. But, the derivative at a point is simply the tangent at that point. If the tangent has a positive slope, the velocity is positive; otherwise it is negative or zero. Because g (^) x is a complex quantity, its tangent is given by the ratio of its imaginary to its real part. This ratio is positive when S 1 x and S 2 x have the same sign, which is what we started out to prove.
(a) It is given that 10% of the image area in the horizontal direction is occupied by a bullet that is 2.5 cm long. Because the imaging device is square (256 × 256 elements) the camera looks at an area that is 25 cm × 25 cm, assuming no optical distortions. Thus, the distance between pixels is 25/ 256 =0.098 cm/pixel. The maximum speed of the bullet is 1000 m/sec = 100,000 cm/sec. At this speed, the bullet will travel 100, 000 / 0.98 = 1.02× 106 pixels/sec. It is required that the bullet not travel more than one pixel during exposure. That is, (1.02× 106 pixels/sec) × K sec ≤ 1 pixel. So, K ≤ 9.8 × 10 −^7 sec.
Order and location of vertices before mirroring the B vertices
Order and location of vertices after mirroring the B vertices
1 2
4 3
1
2
3
4
Figure P11.
Referring to the bottom figure, when the algorithm gets to vertex 2, vertex 1 will be identified as a vertex of the MPP, so the algorithm is initialized at that step. Because of initialization, vertex 2 is visited again. It will be collinear with W (^) C and V L , so B C will be set at the location of vertex 2. When vertex 3 is visited, sgn( V L , W (^) C , V 3 ) will be 0, so B C will be set at vertex 3. When vertex 4 is visited, sgn(1, 3, 4) will be negative, so V L will be set to vertex 3 and the algorithm is reini- tialized. Because vertex 2 will never be visited again, it will never become a ver- tex of the MPP. The next MPP vertex to be detected will be vertex 4. Therefore, indentations 2 pixels or greater in depth and 1 pixel wide will be represented by the sequence 1 − 3 − 4 in the second figure. Thus, the algorithm solves the cross- ing caused by the mirroring of the two B vertices by keeping only one vertex. This is a general result for 1-pixel wide, 2 pixel (or greater) deep intrusions.
(a) The resulting polygon would contain all the boundary pixels.
(a) The solution is shown in Fig. P11.6(b).
Figure P11.
(a) From Fig. P11.7(a), we see that the distance from the origin to the triangle is given by
r ( θ ) =
cos θ 0 ◦^ ≤ θ < 60 ◦
=
cos( 120 ◦^ − θ ) 60 ◦^ ≤ θ < 120 ◦
=
cos( 180 ◦^ − θ ) 120 ◦^ ≤ θ < 180 ◦
=
cos( 240 ◦^ − θ )
180 ◦^ ≤ θ < 240 ◦
=
cos( 300 ◦^ − θ ) 240 ◦^ ≤ θ < 300 ◦
=
cos( 360 ◦^ − θ ) 300 ◦^ ≤ θ < 360 ◦
Figure P11.
(a) The number of symbols in the first difference is equal to the number of seg- ment primitives in the boundary, so the shape order is 12.
The mean is sufficient.
This problem can be solved by using two descriptors: holes and the convex de- ficiency (see Section 9.5.4 regarding the convex hull and convex deficiency of a set). The decision making process can be summarized in the form of a simple decision, as follows: If the character has two holes, it is an 8. If it has one hole it is a 0 or a 9. Otherwise, it is a 1 or an X. To differentiate between 0 and 9 we compute the convex deficiency. The presence of a ”significant” deficiency (say, having an area greater than 20% of the area of a rectangle that encloses the char- acter) signifies a 9; otherwise we classify the character as a 0. We follow a similar procedure to separate a 1 from an X. The presence of a convex deficiency with four components whose centroids are located approximately in the North, East, West, and East quadrants of the character indicates that the character is an X. Otherwise we say that the character is a 1. This is the basic approach. Imple- mentation of this technique in a real character recognition environment has to take into account other factors such as multiple ”small” components in the con- vex deficiency due to noise, differences in orientation, open loops, and the like. However, the material in Chapters 3, 9 and 11 provide a solid base from which to formulate solutions.
(b) Normalize the matrix by dividing each component by 19600 + 200 + 20000 = 39800:
0.4925 0. 0 0.
so p 11 = 0.4925, p 12 = 0.005, p 21 = 0, and p 22 = 0.5025.
(a) The image is 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
Let z (^) 1 = 0 and z (^) 2 = 1. Because there are only two intensity levels, matrix G is of order 2 × 2. Element g (^) 11 is the number of pixels valued 0 located one pixel to the right of a 0. By inspection, g (^) 11 = 0. Similarly, g (^) 12 = 10, g (^) 21 = 10, and g (^) 22 = 0. The total number of pixels satisfying the predicate P is 20, so the normalized co-occurrence matrix is G =
The mean square error, given by Eq. (11.4-12), is the sum of the eigenvalues whose corresponding eigenvectors are not used in the transformation. In this particular case, the four smallest eigenvalues are applicable (see Table 11.6), so the mean square error is
e (^) m s =
j = 3
λj = 1729.
The maximum error occurs when K = 0 in Eq. (11.4-12) which then is the sum of all the eigenvalues, or 15039 in this case. Thus, the error incurred by using only the two eigenvectors corresponding to the largest eigenvalues is just 11.5 % of the total possible error.
When the boundary is symmetric about the both the major and minor axes and both axes intersect at the centroid of the boundary.
We can compute a measure of texture using the expression
R ( x , y ) = 1 −
1 + σ^2 ( x , y )
From the definition of the Euclidean distance,
D (^) j ( x ) =
/ x − m j
/ (^) = ( x − m j ) T^ ( x − m j ).^1 /^2
Because D (^) j ( x ) is non-negative, choosing the smallest D (^) j ( x ) is the same as choos- ing the smallest D^2 j ( x ), where
D^2 j ( x ) =
/ x − m j
/^2 = ( x − m j ) T^ ( x − m j ) = x T^ x − 2 x T^ m j + m Tj m j
= x T^ x − 2
x T^ m j −
m Tj m j
We note that the term x T^ x^ is independent of^ j^ (that is, it is a constant with re- spect to j in D^2 j ( x ), j = 1, 2,.. .). Thus, choosing the minimum of D^2 j ( x ) is equiva-
lent to choosing the maximum of
x T^ m j − 12 m Tj m j
The solution is shown in Fig. P12.4, where the x ’s are treated as voltages and the Y ’s denote impedances. From basic circuit theory, the currents, I ’s, are the products of the voltages times the impedances. The system operates by select- ing the maximum current, which corresponds to the best match and, therefore,
109
Figure P12.
performs character recognition by the minimum-distance approach. The speed of response is instantaneous for all practical purposes.
The solution to the first part of this problem is based on being able to extract connected components (see Chapters 2 and 11) and then determining whether a connected component is convex or not (see Chapter 11). Once all connected components have been extracted we perform a convexity check on each and reject the ones that are not convex. All that is left after this is to determine if the remaining blobs are complete or incomplete. To do this, the region consisting of the extreme rows and columns of the image is declared a region of 1’s. Then if the pixel-by-pixel AND of this region with a particular blob yields at least one result that is a 1, it follows that the actual boundary touches that blob, and the blob is called incomplete. When only a single pixel in a blob yields an AND of 1 we have a marginal result in which only one pixel in a blob touches the boundary. We can arbitrarily declare the blob incomplete or not. From the point of view of implementation, it is much simpler to have a procedure that calls a blob incomplete whenever the AND operation yields one or more results valued