[Solved]Function Name Whoneedsphotoshop Inputs 1 Char Filename Image Posterize 2 Double Number Col Q37105009
matlab
Function Name: whoNeedsPhotoshop Inputs 1. (char) filename of an image to posterize 2. (double) the number of color intervals to have File Outputs 1. The posterized image Background this easy interface. You will make a function that mimics the posterize effect in MATLAB code Function Description Photoshop is a great image processing tool. But someone had to write the code behind The posterize effect works by reducing the number of colors in an image. To start, take the range of possible pixel values (0 to 255) and split it into the number of intervals given by the second input. These intervals should be even size Then for each pixel in the image, figure out Which interval the red, green, and blue values are in. Replace a pixel’s color value with the middle of the interval it falls into. The resulting image should be written to a new file with ‘_posterized’ appended to the end of the original file name Example: If the input image is a single pixel that looked like 85 and the number of color intervals is 6, then the intervals would be [0, 42.5), [42.5, 85), [85, 127.5), [127.5, 170), [170, 212.5), [212.5, 255 The result of the function would look like 21 106 Notes: The values for each color within each pixel should be changed separately. So a pixel’s . new red value does not depend on it’s green or blue values . If there are decimals in your final value calculations, they should be rounded to the nearest whole integer . If a value falls on the border between 2 intervals, it should go the upper interval Hints Think about using the linspace() function to create the intervals . Show transcribed image text Function Name: whoNeedsPhotoshop Inputs 1. (char) filename of an image to posterize 2. (double) the number of color intervals to have File Outputs 1. The posterized image Background this easy interface. You will make a function that mimics the posterize effect in MATLAB code Function Description Photoshop is a great image processing tool. But someone had to write the code behind The posterize effect works by reducing the number of colors in an image. To start, take the range of possible pixel values (0 to 255) and split it into the number of intervals given by the second input. These intervals should be even size Then for each pixel in the image, figure out Which interval the red, green, and blue values are in. Replace a pixel’s color value with the middle of the interval it falls into. The resulting image should be written to a new file with ‘_posterized’ appended to the end of the original file name Example: If the input image is a single pixel that looked like 85 and the number of color intervals is 6, then the intervals would be [0, 42.5), [42.5, 85), [85, 127.5), [127.5, 170), [170, 212.5), [212.5, 255 The result of the function would look like 21 106 Notes: The values for each color within each pixel should be changed separately. So a pixel’s . new red value does not depend on it’s green or blue values . If there are decimals in your final value calculations, they should be rounded to the nearest whole integer . If a value falls on the border between 2 intervals, it should go the upper interval Hints Think about using the linspace() function to create the intervals .
Expert Answer
Answer to Function Name: whoNeedsPhotoshop Inputs 1. (char) filename of an image to posterize 2. (double) the number of color inte… . . .
OR

