$30
1. The figure below shows the projection geometry of the pin-hole camera model. A point P has coordinates (π₯π₯, π¦π¦, π§π§) = (4,5,9) meters with respect to the world coordinate system. Compute the coordinates (π₯π₯′, π¦π¦′) of point P in the real image plane. Assume that the camera has a focal length of 45 mm.
2. Assume that the real image plane (π₯π₯′, π¦π¦′) of a camera is of size 1 cm ×
1 cm. The real image plane is digitized into a digital image of size 1024 × 1024 pixels. Assume that the real image plane has origin at the lower left corner, with the π₯π₯′ axis pointing to the right and the π¦π¦′ axis pointing upward. The digital image plane has origin (0,0) at the upper left corner, with the i axis pointing downward and the j axis pointing to the right. The range for both i and j is therefore [0, 1023].
(a) Write the equations that map coordinates (π₯π₯′, π¦π¦′) from the real image plane to coordinates
(ππ, ππ) in the digital image plane. Note that (π₯π₯′,π¦π¦′) are floating point numbers and (ππ, ππ) are integers.
(b) A point P has coordinates (π₯π₯′, π¦π¦′) = (0.49, 0.78) cm on the real image plane. What are the coordinates (ππ, ππ) of the point P on the digital image plane?
3. Apply the Sobel’s operators to the 4×4 image in the image below and compute the gradient magnitude, gradient angle, and edge angle at each pixel location. The gradient and edge angles will be with respect to the positive x-axis that points to the right. Use the regular definition for magnitude (i.e., square root of the sum of squares of horizontal and vertical gradients.) Let the output be undefined if the edge templates go outside of the boundary of the input image.
120
125
212
239
90
120
200
200
85
195
180
210
75
212
255
195
A 4× 4 image (Numbers in array represent gray level values.)
4. Determine the output image value at pixel location (ππ, ππ) = (3,3) (as circled) if (a) a 3 x 3 mean filter is applied, (b) a 3 x 3 median filter is applied and (c) gamma correction with a gamma value of 2.5 is applied to the image in the figure below, where the numbers in the array represent gray level values. For (a) and (b), let the center pixel of the filter mask be the reference center. The image uses the (ππ, ππ) coordinate system with origin (0,0) located at the upper-left corner pixel. For (a) and (c), round off your results to the nearest integer.
20 30 35 99 89 90 55 99
66 67 90 89 99 87 86 85
77 162 163 189 98 99 93 89
75 180 188 100 220 78 130 98
70 165 170 65 110 70 140 45
98 200 65 75 85 95 130 75
70 100 130 89 160 159 140 99
33 43 54 66 77 86 96 99
5. If we use a 9 × 9 Gaussian template (with reference pixel at the center) to perform Gaussian filtering of an input image of size ππ × ππ (width × height,) how many add, multiply and divide operations will be required in total to filter the entire image? Give total number separately for the three operations. Assume that we use convolution to perform the filtering and we divide the result by a constant integer value c at each pixel location for normalization. If the template goes outside of the border of the image, we can leave the output be undefined and therefore no calculations are needed at that pixel location. Express your answer in terms of P and Q.
6. Write the difference equations represented by the two templates for the Prewitt’s edge operator. Use i and j as indices in the equations (i and j refer to the axes of the digital image plane with i pointing downward and j pointing to the right.)
7. Given the grayscale histogram of a 10 × 8 image as shown below, apply the Iterative Threshold Selection algorithm below to determine the threshold value for the thresholding operation of the image. In your answer, write down the threshold value after each iteration of step 4 of the algorithm. In the figure below, the number above each vertical bar is the height of the bar.
• Algorithm: Iterative Threshold Selection
1. Select an initial estimate of the threshold T. Use the average intensity of the image as the initial estimate.
2. Partition the image into the foreground and background regions using the threshold T. Let foreground pixels be pixels with grayscale value ππ ≥ ππ and background pixels be pixels with grayscale ππ < ππ.
3. Calculate the mean gray level values πππΉπΉ and πππ΅π΅ for the foreground and background regions.
4. Compute a new threshold ππ = 12 (πππΉπΉ + πππ΅π΅)
5. Repeat Steps 2 – 4 until the mean values πππΉπΉ and πππ΅π΅ in successive iterations do not change any more.
8. A 1024 × 1024 binary image of a chessboard is as shown below. The chessboard consists of 8 × 8 squares of black and white colors. (a) What are the x and y dimensions of each square of the chessboard. (b) A quadtree is constructed to represent the binary image. What is the size (total # of nodes) of the quadtree? No need to actually construct and draw the quadtree. Just determine the total number of nodes. Show all work to get full credits.