Ed West Tech Desktop Windo image image_2 image_3 he Useful MATLAB functions: imread, class, eye, imshow, subplot 2. (4 pts, 1 pt each) Image indexing. Consider the image "mri axial.tif" from the previous exercise. Load it into the variable mri image. (a)(1 pt) Display the region of mri image defined by the rows 160 to 260 and the columns 125 to 225. (b) (1 pt) Find the linear index for the element (30,40) of mri image. Retrieve the value of that pixel using both the linear index and the usual index (also called subscript index). Finally, retrieve back the subscript index from the linear index. (c) (1 pt) Copy mri image to another variable mri_image_test. Set every odd row of the mri_image_test to 0. Then set every odd column of the mri_image test to 0. Finally, create another image mri_image_small which contains only the non zeroed values of mri_image_test (i.e. all the values which lay on even rows and columns). Display side by side mri_image, mri_image test and mri_image_small in the same figure. (d) (1 pt) Copy to another variable called mri_image_th. Set all the pixels of mri_image_th where the intensity value is less than 50 to 0, and all the pixels above or equal to 50 to 1. This operation is called thresholding. Display mri_image_th and mri_image side by side. What do you think this operation can be useful for? Useful MATLAB functions: rand, ind2sub, sub2ind, subplot 3. (2 pts) 2D Convolution. In this exercise we will calculate 2D convolutions using the MATLAB function conv2. Consider the following convolution masks, known as 2D Sobel filters: --2-1 S, -2 0 2 Sy 0 0 -10 2 1 0 1 0 1 (a) (1 pt) Calculate the 2D convolution of mri image with the two filters. Can you guess what each filter is designed to do? (b) (1 pt) What is the relationship between the size of mri_image, the size of the filters (in this case, 3x3) and the size of the convolution output? Useful MATLAB functions: conv2. Reminder: In MATLAB you can use the command help and doc to obtain help about functions. Note: Your lab write-up should include answers to all the questions, as well as observations and comments you have along the way. The MATLAB published report of this lab need to be printed. Ed West Tech Desktop Windo image image_2 image_3 he Useful MATLAB functions: imread, class, eye, imshow, subplot 2. (4 pts, 1 pt each) Image indexing. Consider the image "mri axial.tif" from the previous exercise. Load it into the variable mri image. (a)(1 pt) Display the region of mri image defined by the rows 160 to 260 and the columns 125 to 225. (b) (1 pt) Find the linear index for the element (30,40) of mri image. Retrieve the value of that pixel using both the linear index and the usual index (also called subscript index). Finally, retrieve back the subscript index from the linear index. (c) (1 pt) Copy mri image to another variable mri_image_test. Set every odd row of the mri_image_test to 0. Then set every odd column of the mri_image test to 0. Finally, create another image mri_image_small which contains only the non zeroed values of mri_image_test (i.e. all the values which lay on even rows and columns). Display side by side mri_image, mri_image test and mri_image_small in the same figure. (d) (1 pt) Copy to another variable called mri_image_th. Set all the pixels of mri_image_th where the intensity value is less than 50 to 0, and all the pixels above or equal to 50 to 1. This operation is called thresholding. Display mri_image_th and mri_image side by side. What do you think this operation can be useful for? Useful MATLAB functions: rand, ind2sub, sub2ind, subplot 3. (2 pts) 2D Convolution. In this exercise we will calculate 2D convolutions using the MATLAB function conv2. Consider the following convolution masks, known as 2D Sobel filters: --2-1 S, -2 0 2 Sy 0 0 -10 2 1 0 1 0 1 (a) (1 pt) Calculate the 2D convolution of mri image with the two filters. Can you guess what each filter is designed to do? (b) (1 pt) What is the relationship between the size of mri_image, the size of the filters (in this case, 3x3) and the size of the convolution output? Useful MATLAB functions: conv2. Reminder: In MATLAB you can use the command help and doc to obtain help about functions. Note: Your lab write-up should include answers to all the questions, as well as observations and comments you have along the way. The MATLAB published report of this lab need to be printed