Image Processing 048860 Final Test Time: 100 minutes. Allowed materials: A calculator and any written/printed materials are allowed. Answer 4-6 complete questions of the following 10 questions in order to accumulate 10 asterisks (*). Each asterisk is worth 10 points. Your answers will be graded according to their order in your submitted exam, up to accumulation of 10 asterisks. In certain combinations, also 11 asterisks are acceptable (e.g., Q1, 2, 3, 5, 7), subject to normalization of the accumulated points by 10/11, etc. Good Luck! 1. Quality Criterion for Images (**) a. Consider a vector space in which images are described as vectors of length n, where n is the number of pixels in the images. Can a Gaussian model and Euclidian distance be used as a good predictor for human judgment of image quality? Explain. b. For portrait images (e.g., Lena) determine, as much as possible, if each of the following operations is affecting the (i) Human observer, (ii) Euclidian distance, (iii) Mannos & Sakrison's distortion function: b1. Adding a specific constant to all the pixels b2. Adding white noise at a low SNR b3. Adding white noise at a high SNR b4. Low Pass spatial filtering with cut-off frequency of 100 cycles-per-degree b5. High Pass spatial filtering with cut-off frequency of 30 cycles-per-degree b6. Painting the eye pupils and eyebrows in white. Explain each answer. If the outcome is not fully predictable, explain why. 2. Color Image Processing (**) Consider an image of several colored squares on a white background. The colors of the squares are red, green, blue, cyan, yellow and magenta. Assume that the image is processed according to the operator of Fig. 10 in Faugeras' paper. Describe the results of the process in the following situations, with regard to the resultant color of the squares and the background, and the possibility to distinguish between the squares' colors and brightness: a. A is set to zero b. C1 is set to be equal to C2 c. C1 and C2 are set to be equal to A d. The H1 and H2 filters are set to have frequency response as of H (Fig. 4). 1/9
3. Signal reconstruction from Phase (***) Consider the following 2 images, I 1 and I 2 : I 1 I 2 Figure 1: the original images A student has performed a 2D Fourier transform of the above 2 images, marked here as FI FI i 1,2 i i. The student tried to reconstruct the images from partial information of the Fourier transform in the following 4 methods: a. Using amplitude-only data b. Using phase-only data ˆ a 1 Ii F FIi 1 i Iˆ F j FI b exp i c. Switching between the phase and amplitude information of the images, i.e., 1 ˆ c 1 exp Iˆ F FI j FI I F FI j FI c exp 1 2 1 2 1 2 d. Using the average of the 2 amplitude functions as magnitude of the reconstructed image and the original phase information of each image as phase: d 1 FI1 FI2 Iˆ i F exp j FIi 2, i 1,2 In Figures 2 & 3, various reconstructed images are shown. Associate each reconstructed image with the result of each reconstruction method according to Table 1. If there is more than one option, indicate why and explain. 2/9
Explanation Reconstruction Method (a, b, c, or d) Table 1 Result Image A B C D E F G H 3/9
A B C D Figure 2 4/9
E F G H Figure 3 4. Laplacian Pyramid (*) a. A Hi-Tech company is trying to implement processes of encoding and decoding images using the Gaussian pyramid by hardware. The company has several hardware components that can perform various non-gaussian filtering by 5x5 kernels, as follows. 5/9
w 3 1 1 1 1 1 1 1 1 1 1 1 w1 1 1 1 1 1 C 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 C3 1 1 1 1 1 1 1 1 1 1 w 4 1 1 1 1 1 1 2 2 2 1 1 w2 1 3 3 3 1 C2 1 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 1 1 1 3 3 3 1 C4 1 2 2 2 1 1 1 1 1 1 The coefficients C i, ( i=1, 2, 3, 4 ) are determined such that the sum of all elements in a kernel are equal to 1. Assuming that perfect reconstruction is not required, which of the above kernels can replace a Gaussian kernel? Explain. 5. Wavelet Transform (**) a. Explain shortly (2-3 lines for each item) why the wavelet transform is more suitable than the Gabor transform for describing images considering (1) The characteristics of the human vision system, (2) Sharp edges representation. b. Given the function f x 2 x x x (1) Is it possible to represent this function 0 0 1. else f x for 0 x 1 by the Haar basis using a finite number of coefficients? If yes, determine the coefficients. If not, explain why. (2) Define f x as the best approximation of the function f resolution levels 0,1 1 j j, i.e., f x d jn, j 2 x n2 n0 j0 the coefficients d jn, for j0,1 n 0,1,... x for two. Calculate 6. Still Image Compression (***) a. Given a one-dimensional Gaussian source with fixed noise conditions (constant SNR), compare and determine the order of performance (from the best to the worst) for the following 4 encoders with regard to bit-rate: 6/9
a1. Max Loyd a2. Optimum Uniform a3. Shannon Quantizer a4. Uniform optimal with entropy coding. Explain the order according to the properties of the encoders and the assumptions used. b. Referring to the JPEG algorithm, assess and compare the expected compression ratio of the following 256x256 images, where each pixel could be only 0 (black), 100 (grey) or 255 (white): b1. Entirely white image. b2. An image of vertical black stripes of 8 pixel width on white background, with 8 pixels between stripes. b3. An image of vertical black stripes of 8 pixel width on white background, with 7 pixels between stripes. b4. An image of vertical grey stripes of 8 pixel width on white background, with 8 pixels between stripes. b5. An image of vertical grey stripes of 4 pixel width on white background, with 7 pixels between stripes. b6. An image of vertical grey stripes of 4 pixel width on white background, with 7 pixels between stripes. b7. An image that gradually changes from white (255) on one side to black (0) on the other side. 7. Edge Detection (**) A Canny edge detector is designed to cope with noisy images of various SNR levels. a. Which parameter of the Canny operator should be changed according to the noise level? b. For a constant SNR level, what trade-off will be obtained by increasing or decreasing the above parameter? c. Explain shortly why a different optimal operator is obtained in the case of a ridge profile (Fig. 2 in the paper) compared to the case of a roof profile (Fig. 3 in the paper). 8. Second Generation Compression of Still images (**) Kindergarten kids get pieces of paper cut in shapes of Squares, Rectangles and Circles, having 8 grey levels. The sizes of these pieces are in the range of 1-120 pixels. Each kid prepares an image for his/her parents by gluing the pieces on a white sheet of paper. Figure 4 shows the 256x256 image prepared by Tali: 7/9
Figure 4 A 2 nd generation compression system is built to compress those images using all the available data about the creation of these images. Assume that this system uses a 2-bit code for the encoding / transmission of each of the shapes: "00" before the transmission of a square, "10" for a rectangle and "11" for a circle (disk). According to these 2-bit codes, the decoder knows how many bits are expected for each shape and how the related data is encoded. a. What is the minimal number of bits that are needed to encode a square, including its grey level? b. What is the minimal number of bits that are needed to encode a rectangle, including its grey level? c. What is the minimal number of bits that are needed to encode a disk, including its grey level? d. What is the expected compression ratio of Tali's image assuming that the original is a 256x256 image with 256 grey levels per pixel? e. Given the following sizes (in pixels) for Tali's image: - Radius of a small disk: 5 - Radius of a big disk: 40 - Size of the rectangle that makes the trunk of the tree: 100x20 - Size of the rectangle that makes the house: 80x60 - Size of the rectangle that makes each part of the window: 15x30 - Size of the square that makes the door: 40x40 What is the expected compression ratio according to the 2 nd generation approach as presented in class, i.e., without using the available data about the creation of these images? Compare to your answer to d. 8/9
9. Image restoration (**) Consider an image of a dark disk on a grey background. Propose ways to restore the image if it was degraded by the following operators: a. Low spatial frequency noise is added to the image b. High spatial frequency noise is added to the image c. Mid-range spatial frequency noise is added to the image d. De-Focusing blur e. Motion blur due to movement of the camera. Explain in detail according to the types of restoration described in Sondhi's paper. 10. Video Compression (*) Consider the images b2, b3 and b4 of Question 6 as moving. Compare the expected compression ratio using MPEG when the motion is: a. Horizontally (i.e., the stripes are moving from right to left) b. Vertically (up or down) c. Diagonally (i.e., combination of a + b). The stripes remain vertical in all the above sequences. 9/9