Skip to content

Commit

Permalink
use MMSE TDOA instead of mode of TDOA distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
mim committed Aug 14, 2015
1 parent 23642ce commit 96452a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions messlMultichannel.m
Expand Up @@ -141,7 +141,8 @@

if (Np > Ch) && useConsistentTdoa
% Compute global TDOA at each mic, re-derive pairwise ITDs
perPairTdoa = tau(squeeze(argmax(pTauIInit,2)))';
perPairTdoa = tau(squeeze(argmax(pTauIInit,2)))'; % posterior mode
% perPairTdoa = squeeze(sum(bsxfun(@times, tau, pTauIInit), 2) ./ sum(pTauIInit,2))'; % posterior mean
[perMicTdoa tauPosInit] = perMicTdoaLs(perPairTdoa(:,1:end-garbageSrc), channelPairs);
else
tauPosInit = [];
Expand Down Expand Up @@ -298,11 +299,13 @@

% Compute per-mic TDOAs
pTauI = cat(3, ipdParams.p_tauI);
perPairTdoa = tau(squeeze(argmax(pTauI,2)))';
perPairTdoa = tau(squeeze(argmax(pTauI,2)))'; % posterior mode
% perPairTdoa = squeeze(sum(bsxfun(@times, tau, pTauI), 2) ./ sum(pTauI,2))'; % posterior mean
perMicTdoa = perMicTdoaLs(perPairTdoa(:,1:end-garbageSrc), channelPairs);

params = struct('ipdParams', ipdParams, 'ildParams', ildParams, ...
'spParams', spParams, 'perMicTdoa', perMicTdoa);
'spParams', spParams, 'perMicTdoa', perMicTdoa, ...
'channelPairs', channelPairs, 'tau', tau);

% Compute hard masks, potentially using the MRF model
[~,~,~,hardSrcs] = messlMrfApply(nuIld, nuIpd, p_lr_iwt, mrfCompatPot, mrfHardCompatExp, mrfLbpIter, 'max');
Expand Down
2 changes: 1 addition & 1 deletion perMicTdoaLs.m
Expand Up @@ -42,7 +42,7 @@
break
end

failed = (mean(keep,1) < minKeepPairFrac) | (sum(keep,1) <= Ch);
failed = (mean(keep,1) < minKeepPairFrac) | (sum(keep,1) <= Ch+1);
unRobustObs = any(keep ~= lastKeep, 1) & ~failed;
end
%plot(estPerPair, perPair(1:end-1,:), '.')
Expand Down

0 comments on commit 96452a0

Please sign in to comment.