Answered step by step
Verified Expert Solution
Question
1 Approved Answer
USE MATLAB. USE MATLAB. NOT JAVA. Here is where the link in the notes leads: https://en.wikipedia.org/wiki/Kernel_(image_processing) Function Name: zamboni Inputs: 1. (char) The file name
USE MATLAB. USE MATLAB. NOT JAVA.
Here is where the link in the notes leads: https://en.wikipedia.org/wiki/Kernel_(image_processing)
Function Name: zamboni Inputs: 1. (char) The file name of the input image, including file extension Outputs None File Outputs 1. The output image with blur' appended to the beginning of the filename Banned Functions: All image functions except imread() and imwrite() are banned for this problem. Background The International Olympics Committee needs you to smooth out the ice before the big curling event! They need you to drive the zamboni over all of the ice in the rink. In order to show the Committee that you did your job, you will show what the design under the ice looks like, but more blurry than before. Function Description: Write a function called zamboni) that takes in an input image and outputs the same mage modified with a box blur. In a box blur operation, each center pixel becomes the average of all 9 pixels around it (including itself), for every color layer. Refer to the example operation below for a 3x3 uint8 array. 30 30 30 60 60 60 To determine the color values of the pixels in the output image, follow these steps: 1) Index out a 3x3 piece of the original array, where the middle pixel of the 3x3 piece corresponds to the new pixel 2) Average the values in the 3x3 array, then set the new pixel to the average value (Do this for each layer of the image separately) 3) Repeat steps 2) and 3) for all 3x3 pieces of the image array There are not enough pixels in the original image to calculate the border values. Hence, the output image will have 2 fewer rows (top and bottom rows) and 2 fewer columns (far left and right columns) than the original. Write the resultant image with 'blur_' appended to the beginning of the input image filename Homework 07-Iteration Example >zamboni( 'spongebobImg-png') spongebobImg.png blur spongebobImg.png Notes: Check out this link for more information about kernels and image processing. You should not overwrite pixels in the original image as you iterate. Use the original pixel values to determine your new output pixels. The solution file will produce file outputs named . . blur_coriginal filename>_soln.png Function Name: zamboni Inputs: 1. (char) The file name of the input image, including file extension Outputs None File Outputs 1. The output image with blur' appended to the beginning of the filename Banned Functions: All image functions except imread() and imwrite() are banned for this problem. Background The International Olympics Committee needs you to smooth out the ice before the big curling event! They need you to drive the zamboni over all of the ice in the rink. In order to show the Committee that you did your job, you will show what the design under the ice looks like, but more blurry than before. Function Description: Write a function called zamboni) that takes in an input image and outputs the same mage modified with a box blur. In a box blur operation, each center pixel becomes the average of all 9 pixels around it (including itself), for every color layer. Refer to the example operation below for a 3x3 uint8 array. 30 30 30 60 60 60 To determine the color values of the pixels in the output image, follow these steps: 1) Index out a 3x3 piece of the original array, where the middle pixel of the 3x3 piece corresponds to the new pixel 2) Average the values in the 3x3 array, then set the new pixel to the average value (Do this for each layer of the image separately) 3) Repeat steps 2) and 3) for all 3x3 pieces of the image array There are not enough pixels in the original image to calculate the border values. Hence, the output image will have 2 fewer rows (top and bottom rows) and 2 fewer columns (far left and right columns) than the original. Write the resultant image with 'blur_' appended to the beginning of the input image filename Homework 07-Iteration Example >zamboni( 'spongebobImg-png') spongebobImg.png blur spongebobImg.png Notes: Check out this link for more information about kernels and image processing. You should not overwrite pixels in the original image as you iterate. Use the original pixel values to determine your new output pixels. The solution file will produce file outputs named . . blur_coriginal filename>_soln.pngStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started