ENG 7854 / 9804 Industrial Machine Vision Midterm Exam March 1, 2010. Instructions: a) The duration of this exam is 50 minutes (10 minutes per question). b) Answer all five questions in the space provided. c) Exam is closed book, closed notes. d) Exam will be graded out of 50 points as indicated; 10 points for Problem 1 10 points for Problem 2 10 points for Problem 3 10 points for Problem 4 10 points for Problem 5 Student Name: Student ID: ENG 7854/9804 Industrial Machine Vision Page 1 of 10
Problem 1: (10 points: 5 + 5) Figure 1 represents several white (i.e., 1 ) binary blobs on a black (i.e., 0) background. a) Perform the first pass of a basic connected component labeling algorithm assuming 8-neighbor connectivity. Label the pixels that make up the white binary blobs beginning with the label 2 and construct the equivalence table in the space provided. b) Manually resolve the equivalence table and indicate the results of the second pass of connected component labeling in Figure 2. Figure 1 ENG 7854/9804 Industrial Machine Vision Page 2 of 10
Equivalence Table: Figure 2 ENG 7854/9804 Industrial Machine Vision Page 3 of 10
Problem 2: (10 points: 4 + 4 + 2) The 5 X 5 image shown below is subject to random ( Salt-and-Pepper ) noise: a) Reduce the effects of the noise by applying a local averaging filter over a 3 X 3 kernel. Specify the kernel used. b) Apply a median filter also over a 3 X 3 kernel. c) Discuss the relative advantages and disadvantages of both techniques. Note: The values in parentheses are included for determining values along the perimeter of the image. (0) (0) (0) (0) (0) (0) (0) (0) 0 135 0 135 0 (0) (0) 0 0 0 0 0 (0) (180) 180 180 180 0 135 (0) (180) 180 180 180 0 0 (0) (180) 180 180 180 0 135 (0) (180) (180) (180) (180) (0) (0) (0) Results of local averaging filter ENG 7854/9804 Industrial Machine Vision Page 4 of 10
Results of Median filter ENG 7854/9804 Industrial Machine Vision Page 5 of 10
Problem 3: (10 points: 5 + 5) a) Write pseudo code that implements a convolution over a 3X3 kernel. Assume an image, f(y,x), with k gray levels and a size of n_rows and m_col (y corresponds to the rows and x corresponds to the columns). Assume the first pixel in the image is given by f(1,1) and make sure the algorithm handles the pixels along the perimeter of the image in an appropriate manner. ENG 7854/9804 Industrial Machine Vision Page 6 of 10
ENG 7854/9804 Industrial Machine Vision Page 7 of 10
Problem 4: (10 points) The crack code shown below represents a white (i.e., 1 ) binary blob on a black (i.e., 0 ) background. Crack Code: 1, 1, 2, 1, 1, 0, 1, 2, 2, 2, 1, 2, 3, 0, 3, 3, 3, 2, 3, 0, 3, 0, 0, 0 a) Sketch the contour of the blob in the space provided. Note that the reference frame (0, 0) is in the upper left hand corner of the image and that the coordinates of the first pixel encountered during contour tracking are given by x=3, y=4 (beginning in the upper left-hand corner). b) Provide the chain code for the same blob. c) Calculate the perimeter of the region using the chain code representation. Based on the complexity, is the blob closer to a circle or a square? Justify your answer. ENG 7854/9804 Industrial Machine Vision Page 8 of 10
Problem 5: (10 points: 2 + 2 + 2 + 2 + 2) a) A histogram equalization algorithm is applied to an 8-bit gray level image of size 640 by 480. Ideally how many pixels will be at a gray level of 128 after the original image is processed? Explain. b) In order to reduce the noise in an image, 16 successive images of the same scene are averaged on a pixel-by-pixel basis. What is the theoretical improvement in signal to noise ratio? In what way is the image quality adversely affected by this form of averaging? Explain. c) Sketch and/or describe an 8 bit gray level image that is composed of only one spatial frequency in the X direction and no spatial frequencies in the Y direction. ENG 7854/9804 Industrial Machine Vision Page 9 of 10
d) An image of a checkerboard pattern is acquired with a camera that has a spatial resolution of 64 by 64 pixels. If the checkerboard pattern consists of 1156 squares (i.e., 34 by 34) do you foresee any issues in the resulting image? From a theoretical point of view, what is the maximum number of checkerboard squares that can be represented in an image that has a spatial resolution of 64 by 64 pixels? e) We wish to determine the best fit circle corresponding to a set of experimental image points. What are the parameters that must be determined and what is the minimum number of data points required for and an overdetermined system of equations (i.e., more equations that unknowns)? How many data points would result in an overdetermined system of equations for fitting an ellipse? ENG 7854/9804 Industrial Machine Vision Page 10 of 10