-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtileInputAndMaps.m
More file actions
29 lines (24 loc) · 932 Bytes
/
tileInputAndMaps.m
File metadata and controls
29 lines (24 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function tileInputAndMaps(img, maps, tickLabels, cmap, tileTitle)
% Copyright 2019 - 2020 The MathWorks, Inc.
% This function creates a tiled image using `tiledlayout` to create a row of images.
% The supplied image is the first element and the rest is the supplied saliency maps,
% visualised using the color map `cmap`.
arguments
img % Input image used for the saliency maps `maps`
maps % A cell array of saliency maps
tickLabels % The title for each saliency map
cmap % A color map used to show the saliency maps
tileTitle = "" % An overall title for the visualisation
end
t = tiledlayout(1, length(maps)+1, 'Padding', 'none');
% title(t, tileTitle)
xlabel(t, tileTitle);
nexttile
imshow(img)
title(tickLabels{1})
for i=1:length(maps)
nexttile
imshow(maps{i}, cmap)
title(tickLabels{i+1})
end
end