Mercurial > hg > flst
diff matlab/flstDecode.m @ 0:1df4a6fb0d22
added flst files moved over from "smoothie"
author | matthiasm |
---|---|
date | Fri, 31 Oct 2014 10:52:27 +0800 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/flstDecode.m Fri Oct 31 10:52:27 2014 +0800 @@ -0,0 +1,13 @@ +function vpath = flstDecode(d) + +nFrame = min([d.memory, d.updateCount]); +psi = d.psi(:,(d.memory-nFrame+1):d.memory); +vpath = zeros(1, nFrame); + +% initialise backward step +[~, vpath(end)] = max(d.oldDelta); + +% rest of backward step +for iFrame = (nFrame-1):-1:1 + vpath(iFrame) = psi(vpath(iFrame+1), iFrame+1); +end \ No newline at end of file