Question: Function definition and description imshow ( heatmap ( img , rad ) ) ; If your removeNoise function and functions are working correctly, you should

Function definition and description imshow(heatmap(img, 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:
imshow(heatmap(img, removeNoise(scan_radiation(100),15)));
Which should result in this picture:
This method of testing the functions is exactly the same as the step-by-step 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 heatmap_starter.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 3-dimensional matrix of numbers representing
% an image in RGB (red-green-blue) format, which
% forms the background to which the heatmap
% colors are applied.
% rad: a matrix of numbers representing the radiation
% measurements, between 0 and 100 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 = imread('dome_area.jpg');
Then get a set of radiation data:
rad =scanradiation (30);
Next, call your removeNoise function and save the smoothed data back into rad:
rad = removeNoise(rad,15);
Function definition and description imshow (

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 Programming Questions!