Sample Questions Image segment Pixel values 1 65 25 95 65 40 2 10 95 40 65 25 3 95 25 65 40 65 4 65 40 40 10 25 5 25 65 10 65 10 1 2 3 4 5 Figure 1: 5x5 Image patch ----------------------------------------------------------------------------------------------------------------------------1. Given an 8-bit image patch and respective pixel values in Fig. 1, perform the following tasks: a) Suggest a 3x3 smoothing filter mask and calculate the response at pixel location (2,3). b) Suggest a 3x3 sharpening filter mask and calculate the response at pixel location (3,4). c) Apply the filter kernel given below to calculate the filter response at pixel location (3,3). 3x3 Kernel 1 x 16 1 2 1 2 4 2 2 1 1 a) Averaging filter can be used as the smoothing filter: 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 Response at (2,3) = (25+95+65+95+40+65+25+65+40)/9= 57.2222 = 57 b) Laplacian operator can be used as the sharpening filter: 0 1 0 1 -4 1 0 1 0 Response at (3,4) = 65+10-4*40+65+65= 45 c) Filter response at location (3,3) = 1/16*(95+2*40+65+2*25+4*65+2*40+40+2*40+10)= 47.5=47 -----------------------------------------------------------------------------------------------------------------------------2. Consider the image patch with given pixel values in Fig. 1. If the image is to be stretched (resized) using spline interpolation method by factor of 2 in horizontal direction. What will be the estimated pixel value of the new pixel between the two old pixels with 95 and 65 at the top row of the image segment? Given this resizing operation, develop a 1x7 convolution kernel which would be used for the calculation of the new pixels. ----------------------------------------------------------------------------------------------------------------------------65 95 25 65 40 x=1.5 x=0.5 65 0 25 0 95 65 0 0 40 0 Interpolation kernel function: h(0.5)= (1/6)*(3*(0.5)^3-6*(0.5)^2+4)= 0.4792 h(1.5)= (1/6)*(-(1.5)^3+6*(1.5)^2-12*(1.5)+8)= 0.0208 The value of the new pixel between 95 and 65 = (95+65)*0.4792+(40+25)*0.0208= 78.0240=78 b) 1x7 convolution kernel can be considered for the calculation of the unknown pixels in the enlarged image with the following filter coefficients: [0.0208 0 0.4792 0 0.4792 0 0.0208]