Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Martin Karlsson
turtlerob1
Commits
babc8d37
Commit
babc8d37
authored
Sep 24, 2015
by
Fredrik Bagge Carlsson
Browse files
tr back
parent
c63be83a
Changes
1
Hide whitespace changes
Inline
Side-by-side
track_audio.m
View file @
babc8d37
...
@@ -11,6 +11,13 @@ dt = chunks/fs;
...
@@ -11,6 +11,13 @@ dt = chunks/fs;
%% Setup objects
%% Setup objects
% Initialize localization models using braodband and subband settings
% Initialize localization models using braodband and subband settings
% Window size in seconds
winSec
=
20E-3
;
% Lowest and highest center frequency in Hertz of the gammatone filterbank
fLowHz
=
80
;
fHighHz
=
8000
;
dObj
=
dataObject
([],
fs
,
10
,
2
);
dObj
=
dataObject
([],
fs
,
10
,
2
);
% Settings for subband approach
% Settings for subband approach
...
@@ -18,7 +25,7 @@ par_sub = genParStruct('cc_bBroadband',0,'cc_wSizeSec',winSec,...
...
@@ -18,7 +25,7 @@ par_sub = genParStruct('cc_bBroadband',0,'cc_wSizeSec',winSec,...
'cc_hSizeSec'
,
winSec
/
2
,
'cc_maxDelaySec'
,
1.25e-3
,
...
'cc_hSizeSec'
,
winSec
/
2
,
'cc_maxDelaySec'
,
1.25e-3
,
...
'fb_lowFreqHz'
,
fLowHz
,
'fb_highFreqHz'
,
fHighHz
,
...
'fb_lowFreqHz'
,
fLowHz
,
'fb_highFreqHz'
,
fHighHz
,
...
'fb_nERBs'
,
1
,
'ihc_method'
,
'none'
,
...
'fb_nERBs'
,
1
,
'ihc_method'
,
'none'
,
...
'loc_NSources'
,
nSpeakers
(
hh
)
);
'loc_NSources'
,
1
);
% Initialize localization models using braodband and subband settings
% Initialize localization models using braodband and subband settings
mObj
=
manager
(
dObj
,
'localization'
,
par_sub
);
mObj
=
manager
(
dObj
,
'localization'
,
par_sub
);
...
@@ -50,7 +57,7 @@ addpath('./ekfukf-toolbox');
...
@@ -50,7 +57,7 @@ addpath('./ekfukf-toolbox');
figure
(
1
)
figure
(
1
)
N
=
1
;
% The number of steps to run this stuff.
N
=
1
00
;
% The number of steps to run this stuff.
% Initialize posterior mean and covariance
% Initialize posterior mean and covariance
posteriorMean
=
zeros
(
size
(
A
,
1
),
N
);
posteriorMean
=
zeros
(
size
(
A
,
1
),
N
);
...
@@ -60,6 +67,7 @@ posteriorCovariance = zeros(size(A, 1), size(A, 1), N);
...
@@ -60,6 +67,7 @@ posteriorCovariance = zeros(size(A, 1), size(A, 1), N);
% =======================================================
% =======================================================
% Main loop - Perform localization and tracking
% Main loop - Perform localization and tracking
% =======================================================
% =======================================================
display
(
'Entering main loop'
)
tic
();
tic
();
t_old
=
toc
();
t_old
=
toc
();
for
l
=
1
:
N
for
l
=
1
:
N
...
@@ -80,7 +88,7 @@ for l = 1:N
...
@@ -80,7 +88,7 @@ for l = 1:N
posteriorMean
(:,
l
)
=
x
;
posteriorMean
(:,
l
)
=
x
;
posteriorCovariance
(:,
:,
l
)
=
P
;
posteriorCovariance
(:,
:,
l
)
=
P
;
%
pause(max0))
%
pause(max
(,
0))
t_old
=
t_new
;
t_old
=
t_new
;
end
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment