function warpOut = cropWarp(warp, hr, wr, tr)
% Created by Yuandong Tian, Oct. 5, 2009
% Email: yuandong@andrew.cmu.edu
% crop warp images into small patches

if ~exist('tr', 'var')
    tr = 1:warp.nFrame;
end;
warpOut.Xs = warp.Xs(hr, wr, tr);
warpOut.Ys = warp.Ys(hr, wr, tr);

warpOut.h = length(hr);
warpOut.w = length(wr);
warpOut.nFrame = length(tr);
