You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
341 B

function [cont]=max_contour(contours)
i=1;
id=1;
max = 0;
while i+contours(2, id) < size(contours, 2)
contours(2,i);
if contours(2,i) > max
max = contours(2,i);
id = i;
end
i=i+1+contours(2,i);
end
cont = zeros(max, 2);
cont(1:end,1) = contours(1, id+1:id+max);
cont(1:end,2) = contours(2, id+1:id+max);
end