Question: MATLAB CODE % PLEASE ANNOTATE EACH LINE TO BETTER UNDERSTAND WHAT EACH LINE DOES. Thank you. a) Create your own image, of size 256 x

MATLAB CODE

% PLEASE ANNOTATE EACH LINE TO BETTER UNDERSTAND WHAT EACH LINE DOES.

Thank you.

a)

Create your own image, of size 256 x 256 pixels, which contains gradations of color.

The corners are (clockwise from the top left) yellow, purple, blue, green. The intermediate points are smoothly shaded from one end to the other. For example, the point at the center top is halfway between yellow and purple and the point at the very center of the image is halfway between green and blue. Use loops to create the image values for every layer R, G and B. Think about the RGB channel values as values from 0 to 255 and remember how we created vectors back in week 2, using the colon operator and/or the built-in function linspace. At the end of your script, display the image you created, as well as each individual channel. To achieve 4 images in one figure, take a look at the built-in Matlab function subplot. Your figure should look like this:

MATLAB CODE % PLEASE ANNOTATE EACH LINE TO BETTER UNDERSTAND WHAT EACH

b)

%Annotate please.

% Must use subplots

Create a script image2.m. Using the technique described above, create your own image, of size 256 x 256 pixels, which contains gradations of color. This time, the corners are (clockwise from the top left) purple, blue, green and red. The intermediate points are once again smoothly shaded from one end to the other. There is smoothness both horizontally and vertically, but NOT diagonally (see the individual layer images). You can see the image you should create below, as well as the figure with 4 subplots. Take a close look at the Green Layer!

LINE DOES. Thank you. a) Create your own image, of size 256

c)

Can also do part A with no loops and Part B with no loops. Please annotate.

Result should have 4 different scripts.

your own image, of size 256 x 256 pixels, which contains gradations of color The corners are (clockwise from the top left) yellow, purple, blue, green. The intermediate points are smoothly shaded from one end to the other. For example, the point at the center top is halfway between yellow and purple and the point at the very center of the image is halfway between green and blue. seloops to create the image values for every layer R, G and B. Think about the RGB channel values as values from 0 to 255 and remember how we created vectors back in week 2, using the colon operator and/or the built-in function linspace. At the end of your script, display the image you created, as well as each individual channel. To achieve 4 images in one figure, take a look at the built-in Matlab function subplot. Your figure should look like this: your own image, of size 256 x 256 pixels, which contains gradations of color The corners are (clockwise from the top left) yellow, purple, blue, green. The intermediate points are smoothly shaded from one end to the other. For example, the point at the center top is halfway between yellow and purple and the point at the very center of the image is halfway between green and blue. seloops to create the image values for every layer R, G and B. Think about the RGB channel values as values from 0 to 255 and remember how we created vectors back in week 2, using the colon operator and/or the built-in function linspace. At the end of your script, display the image you created, as well as each individual channel. To achieve 4 images in one figure, take a look at the built-in Matlab function subplot. Your figure should look like this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!