No BSD License  

Highlights from
Iterative Pyramidal LK Optical Flow

image thumbnail
from Iterative Pyramidal LK Optical Flow by Berkin Bilgic
An implementation of Lucas-Kanade optical flow computation.

imWarp( flowHor, flowVer, Bin )
function [ B ] = imWarp( flowHor, flowVer, Bin )

%This function warps B towards A

[x y] = meshgrid(1:size(Bin,2),1:size(Bin,1));

B = interp2(Bin, x+flowHor, y+flowVer, 'cubic');
B(isnan(B)) = Bin(isnan(B));

end

Contact us at files@mathworks.com