-
Notifications
You must be signed in to change notification settings - Fork 2
/
e2SimulatedRadarPlot.m
93 lines (76 loc) · 3.42 KB
/
e2SimulatedRadarPlot.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
%% Visualize evaluation results of mixture implementation for Simulated Radar Registration.
%
% Evaluation Example:
% "Simulated Radar"
%
% Corresponding Publication:
% "A Credible and Robust approach to Ego-Motion Estimation using an
% Automotive Radar" (<a href="https://mytuc.org/creme">details</a>)
%
% This file can be seen as extension to e2SimulatedRadar. The results will be
% loaded and different benchmarks for evaluation are executed.
% @author Sven Lange (TU Chemnitz, ET/IT, Prozessautomatisierung)
% This file is part of
% CREME - Credible Radar Ego-Motion Estimation
%
% Copyright (C) 2022 Chair of Automation Technology / TU Chemnitz
% For more information see https://mytuc.org/creme
%
% CREME is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% CREME is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this software. If not, see <http://www.gnu.org/licenses/>.
%
% Contact Information: Sven Lange ([email protected])
%% Load the results
[eCluster, resultsCluster] = libmix4sam.registration.loadRegistrationExperiment(...
'./e2Data/Radar20_50x500Cluster');
[eNoCluster, resultsNoCluster] = libmix4sam.registration.loadRegistrationExperiment(...
'./e2Data/Radar20_50x500NoCluster');
%% Fill evaluation class with the results
% Define a working folder to save the output, leave it empty otherwise.
workingFolder = './e2Data/results'; % e.g. [] or './e2Data/results'
eval = libmix4sam.registration.EvalRadarExperiment();
eval.addExperimentData(eNoCluster);
eval.addResultData(resultsCluster);
eval.addResultData(resultsNoCluster);
eval.procAccuracy(); % Accuracy analysis
eval.procCredibility(); % Credibility / Confidence analysis
%% Create plots and save
eval.plotOutlierAnalysis()
hPlots = struct('Name',{},'Handle',{});
hPlots(end+1).Name = 'AccuracyErrorPlot';
[hPlots(end).Handle, ax] = eval.Accuracy.plotError();
for i = findobj(ax.TransHist,'Type','Histogram'), set(i,'BinWidth',0.01), end
hPlots(end+1).Name = 'CredibilityNEESComparison';
hPlots(end).Handle = eval.Credibility.plotNEESComparison();
% Make the plot a bit nicer
neesplot = libmix4sam.utils.PlotNice(hPlots(end).Handle);
neesplot.setCommonBinWidth(0.1, true);
neesplot.setCommonLimits([0 10],[0 1]);
neesplot.subVertCommonX();
if ~isempty( workingFolder )
if ~exist( workingFolder, 'dir'), mkdir(workingFolder); end
for iPlot = 1:numel(hPlots)
savefig( hPlots(iPlot).Handle,...
fullfile(workingFolder, [hPlots(iPlot).Name '.fig']),'compact');
end
end
%% Create tables and save
TAccuracy = eval.Accuracy.showComparisonTable()
TCredibility = eval.Credibility.showComparisonTable()
TAdditional = eval.tableAdditional()
if ~isempty( workingFolder )
fname = fullfile(workingFolder,'result.xls');
writetable(TAccuracy, fname, 'Sheet', 'Accuracy' , 'WriteRowNames', true);
writetable(TCredibility, fname, 'Sheet', 'Credibility', 'WriteRowNames', true);
writetable(TAdditional, fname, 'Sheet', 'Additional' , 'WriteRowNames', true);
end