Question: Function definition and description imshow ( heatmap ( img , rad ) ) ; If your removeNoise function and functions are working correctly, you should
Function definition and description imshowheatmapimg rad;
If your removeNoise function and
functions are working correctly, you should see a picture that looks like this:
This test case is also available in the
file. You can add test cases to this file to continue testing your
function.
You can also quickly test your functions using different radiation scans by typing this into the Command Window:
imshowheatmapimg removeNoisescanradiation;
Which should result in this picture:
This method of testing the functions is exactly the same as the stepbystep method outlined above, it just puts all of the steps into one
statement. Use whichever method is the most helpful to you!
The function header and comments are provided for you in the file called heatmapstarter.m Don't forget to remove
from the
filename before you try to call this function.
function img heatmap img, rad
Generates a heatmap image by using values
from rad to set values in the hue channel for img.
Hue values vary smoothly depending on the
corresponding radiation level.
img: a dimensional matrix of numbers representing
an image in RGB redgreenblue format, which
forms the background to which the heatmap
colors are applied.
rad: a matrix of numbers representing the radiation
measurements, between and millisieverts
It has the same width and height as the img
parameter.
Testing your heatmap function
To test your heatmap function, first read the dome picture into MATLAB by typing this into the Command Window:
img imreaddomearea.jpg;
Then get a set of radiation data:
rad adiation ;
Next, call your removeNoise function and save the smoothed data back into rad:
rad removeNoiserad;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
