forked from hanzhu97702/IEEE_TGRS_MUNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresult_display.m
33 lines (29 loc) · 866 Bytes
/
result_display.m
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
30
31
32
33
clear;clc;close all;
addpath(genpath('data'));
addpath(genpath('result'));
dataset = 'muffle';
switch dataset
case 'muffle'
load muffle_dataset_130_90.mat M label
load muffle_result.mat
case 'houston170'
load houston_170_dataset.mat M label
load houston170_result.mat
end
%% calculate evaluation metrics
[row, col, num_class] = size(label);
band = size(M,1);
RMSE = sqrt(sum(sum(sum((abu_est-label).^2)))/(row*col*num_class))
[SAD, SADerr]=SadEval(M_est, M)
%% display abundance and endmember results
figure;
for i = 1:num_class
subplot(2,num_class,i);
imagesc(abu_est(:,:,i));axis off;
colormap(jet);
subplot(2,num_class,i+num_class);
imagesc(label(:,:,i));axis off;
colormap(jet);
end
figure;
plot(M_est,'LineWidth',1.5);xlabel('Bands');ylabel('Reflectance')