Download this file

45 lines (33 with data), 771 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
%Take imageSOPs and put them in imageSOP_UIDs matrix
for i=1:size(coords1, 1)
s1 = coords1{i,:};
s2 = regexp(s1, '\|', 'split');
s2(:);
for j= 1:size(s2,2)
s3(j) = regexp(s2(j), '\;', 'split');
end
for k=1:size(s2,2)-1
c=s3{k};
y=c{1};
x=c{2};
x=str2num(x);
y=str2num(y);
b(k)=x;
d(k)=y;
% a(1,k)=x-287;
% a(2,k)=y-87;
end
contour=zeros(512,512);
for f=1:size(s2,2)-1
x=b(f);
y=d(f);
contour(x,y)= 1;
end
contour=im2bw(contour);
figure;
imshow(contour);
clear I;
clear I3;
clear d;
clear b;
end