









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










USC Campus Remote (Check this if you are a DEN student) Notes:
Problem 1 Image Enhancement and Edge Detection (40 points)
Consider an image of size 5x5 as given in Fig 1.
Fig 1.
a. (4 points)
historgram
0
1
2
3
4
5
6
0 1 2 3 4 5 6 7 8 9 Grey Level
b. 4 bits display -> 2 4 = 16 grey levels -> 0~15 [1 point] 0 = a0+b 15 = a9+b [2 point] => b = 0, a = 15/9 = 5/3 = 1. Transfer function: Lnew = Lold * 1.67 [1 points]
historgram
0
1
2
3
4
5
6
(^0 2 3 5) Grey Level 7 8 10 12 13 15 (4 points)
c. Similarly, it will be mapped to 0~15, but now with a uniform histogram
0
1
2
3
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Grey Level (4 Points)
Transfer function: (4 points)
0 -> 0 1 -> 1 (1 pixel), 2 (1 pixel) 2 -> 2 3 -> 3 (1 pixel), 4 (2 pixels), 5 (1 pixel), 6 (1 pixel) 4 -> 6 (1 pixel), 7 (2 pixel), 8 (1 pixel), 9 (1 pixel) 5 -> 9 6 -> 10 (1 pixel), 11 (2 pixel) 7 -> 12 (1 pixel), 13 (1 pixel) 8 -> 13 (1 pixel), 14 (1 pixel), 15 (1 pixel) 9 -> 15
Solution
a. Horizontal:
3.5 3.75 -2.25 -2.25 0.
0 -0.25 0.75 1.75 0.
-1.25 -2.5 1.75 4 1
-0.25 -1 2.25 4.75 1.
-1 -1 3.5 6.75 3.
Vertical
3.5 0.75 1.25 4.75 6.
3 -1.75 -3.25 0.25 2.
-2.25 -1 -0.75 -1 -
-2.75 -1.5 0.25 1.75 3.
-1 -3 -3.5 -1.75 0.
Note: Instead of doing 9 multiplications, 5 summation, and 1 division per pixel, the calculation load can be reduced based on the understanding of the Sobel mask. Here shows the calculation of horizontal gradient for example:
First, pad the matrix by duplicating the pixel to form a 7x7 matrix
Second, extract every other column to form a 7 x 5 matrix due to Sobel method is subtract every other line to evaluate the relations. And we know the first two rows will be identical because of the padding, and so are the last two rows. So there are totally 25 subtractions
Third, sum up every three columns to form a 5x5 matrix and add the middle 25 pixels from above (for the 121 pattern) and divided by 4 to get final answer. You will also find that there are a lot similar patterns to help you reduce the load of calculation
S135: (1 point)
4.5 3.5 0 2 5.
2 -1.25 -1.75 0.75 2.
-2 -2 1 2 0
-2.75 -2.5 1.75 5.5 3.
-1.5 -2.5 0 3.5 2.
d. The two edge maps are pretty much the same because most of the edges are detectable from all four directions in the given image.
Grading criteria: the key point to this question is to indicate image dependency. If without mentioning image dependency, a general argument from the difference in the masks will get 2 points out of 4.
e. Yes, the result will be different. The first order considers the immediate neighbors and itself while the sobel method consider the relationship of 8 neighbors. In the given image, many pixels behave differently from that perspective.
Grading criteria: both the difference in the nature of the methods and image dependency should be mentioned to get full credit.
Problem 2 Morphological Processing (30 points)
(1) (12 points) Show the final converged results of the thinning, shrinking and skeletonizing morphological filters applied to Fig 2, respectively.
Fig 2
Thinning Grading Criteria:
(2) (18 points) We treat a binary image as a set that consists of pixels of values 0 and 1. Then, we can apply bit-wise operations for image manipulation. Examples include union ( ∪ ), intersection ( ∩ ), complement (~), exclusive-OR (XOR), and translation ( Tm n (^) , ), where Tm n ,
Use 0 for white, and 1 for black, show the result of applying the following series of bit-wise operations to the binary image A given in Fig.3.
Fig 3 Grading Criteria:
a) Plot the following image: B ( , j k ) = T (^) −1, 1 − { A j k ( , )} ∪ T 0,0 (^) { A j k ( , )} ∪ T 1,1 { A j k ( , )}
B(j,k)
(9 points)
b) Plot the following three images:
C ( , j k ) = T (^) −1, 1 − { A j k ( , )} XORT 0,0 { A j k ( , )}
D j k ( , ) = T 0,0 (^) { A j k ( , )} XORT 1,1 { A j k ( , )},
E ( j , k ) = C ( j , k ) ∪ D ( j , k ) C(j,k)
(3 points)
D(j,k)
(3 points)
E(j,k)
(3 points)
(1) Observation:
Grading criteria: As long as 3 operations are mentioned, 3 credit will be given
Fig 6 Grading criteria: (1) If the other non-linear transform method is proposed, up to 4 points will be given. (2) If a linear transform method is proposed, up to 2 points will be given
⎝ ⎠ (^) Where θ = 45. (2 points)
(2) No, the perfect recovery is not possible. The reconstructed result won’t be exactly the same as the original image due to the interpolations are involved in both enlarging and rotating, and the operation of interpolation is a multiple to one mapping, which is not revertible.
Problem 4 Texture Segmentation (10 points)
Fig 5
Consider the 8 images given in Fig 5. If we apply the Laws filters to create a 9-d feature vector for each image, which component(s) of the 8 vectors will have the largest difference? Why? Which component(s) of the 8 vectors will have the smallest difference? Why? (Hint: Consider the physical meaning of each mask.)
Grading Criteria: