Download this file

16 lines (9 with data), 239 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
% scale a given contour based on a center and widow size
function Ct=scaleContour(C,cnt,M)
% C : input contour
% cnt : center
% M : window size
Ctx=C(:,1)-cnt(1)+M/2+.5;
Cty=C(:,2)-cnt(2)+M/2+.5;
Ct=[Ctx,Cty];
end