forked from AudioGroupCologne/SUpDEq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
supdeq_optRadius.m
executable file
·55 lines (48 loc) · 1.8 KB
/
supdeq_optRadius.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
%% SUpDEq - Spatial Upsampling by Directional Equalization
%
% function r_opt = supdeq_optRadius(headWidth, headHeight, headLength, method)
%
% This function calculates the optimal radius r (in m) as a linear
% combination of head width, head height, and head depth according to
% Algazi et al. [1] or Bahu & Romblom [2]
%
% Output:
% r - Optimal radius r in m
%
% Input:
% headWidth - Head width in m
% headHeight - Head height in m
% headLength - Head length/depth in m
% method - 'Algazi' or 'Bahu'
% 'Algazi' is default
%
% Dependencies: -
%
% References:
% [1] - Algazi VR., Avendano C., Duda RO. - Estimation of a spherical-head
% model from anthropometry. J. Audio Eng. Soc. 2001; 49(6):472-479.
%
% [2] H. Bahu and R. David, ?Optimization and prediction of the spherical
% and ellipsoidal ITD model parameters using offset ears,?
% in Proceedings of the AES International Conference
% on Spatial Reproduction - Aesthetics and Science, 2018, pp. 1?11.
%
% (C) 2018-2020 by JMA, Johannes M. Arend
% TH Köln - University of Applied Sciences
% Institute of Communications Engineering
% Department of Acoustics and Audio Signal Processing
function r_opt = supdeq_optRadius(headWidth, headHeight, headLength, method)
if nargin < 4 || isempty(method)
method = 'Algazi';
end
if strcmp(method,'Algazi')
%r_opt = 0.51*X1 + 0.019*X2 + 0.18*X3 + 3.2 cm
%width X1 = head half width, X2 = head half height, X3 = head half length
r_opt = 0.51*(headWidth/2) + 0.019*(headHeight/2) + 0.18*(headLength/2) + 0.032;
end
if strcmp(method,'Bahu')
%r_opt = 0.44*X1 + 0.23*X3 + 3.2 cm
%width X1 = head half width, X2 = head half height, X3 = head half length
r_opt = 0.44*(headWidth/2) + 0.23*(headLength/2) + 0.032;
end
end