-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPEASS_ObjectiveMeasure.m
76 lines (71 loc) · 2.98 KB
/
PEASS_ObjectiveMeasure.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
function res = PEASS_ObjectiveMeasure(...
originalFiles,estimateFile,options)
% Main function
%
% Decomposition of an estimated source (or source image) into
% the true target
% + the target distortion (spatially-distorted and filtered version
% of the target)
% + the interference distortion component (spatially-distorted and
% filtered version of other sources)
% + the artifact and noise component
%
% Usage:
%
% - res = PEASS_ObjectiveMeasure(...
% originalFiles,estimateFile)
%
% - res = PEASS_ObjectiveMeasure(...
% originalFiles,estimateFile,options)
%
% Inputs:
% originalFiles is a cell array with the file names related to the
% true sources (the target source is the first one), estimateFile is a string.
% Signals must be stored in .wav files.
%
% Output:
% a structure with final and intermediate results, as follows
% - final results:
% - res.OPS: Overall Perceptual Score
% - res.TPS: Target-related Perceptual Score
% - res.IPS: Interference-related Perceptual Score
% - res.APS: Artifact-related Perceptual Score
% - intermediate results:
% - res.decompositionFilenames: decomposition of the estimate
% - res.ISR, res.SIR, res.SAR, res.SDR: ISR, SIR, SAR, SDR
% computed from the estimated components
% - res.qTarget, res.qInterf, res.qArtif, res.qGlobal:
% audio quality features.
%
% See also:
% extractDistortionComponents.m,
% ISR_SIR_SAR_fromNewDecomposition.m,
% audioQualityFeatures.m,
% map2SubjScale.m
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Version 1.0
% Copyright 2010 Valentin Emiya (INRIA).
% This software is distributed under the terms of the GNU Public License
% version 3 (http://www.gnu.org/licenses/gpl.txt).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Decompose the distortion into specific components
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
res.decompositionFilenames = extractDistortionComponents(originalFiles,estimateFile,options);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Compute ISR, SIR, SAR, SDR from the estimated components (optional)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[res.ISR, res.SIR, res.SAR, res.SDR] = ...
ISR_SIR_SAR_fromNewDecomposition(res.decompositionFilenames);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Compute quality features using PEMO-Q
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[res.qTarget, res.qInterf, res.qArtif, res.qGlobal] = ...
audioQualityFeatures(res.decompositionFilenames);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Non-linear mapping to subjective scale
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[res.OPS, res.TPS,res.IPS,res.APS] = ...
map2SubjScale(res.qTarget, res.qInterf, res.qArtif, res.qGlobal);
return