-
Notifications
You must be signed in to change notification settings - Fork 1
/
landmarks.m
66 lines (56 loc) · 2.56 KB
/
landmarks.m
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
function landCoord = Landmarks(V,CONT,varv,landcont)
Elandmark = V(1,:);
Dlandmark = V(2,:);
Slandmark = V(3,:);
Ilandmark = V(4,:);
newposIlandmark = V(5,:);
newposSlandmark = V(6,:);
existe = CONT(2);
if (landcont == 4)
if (existe == 1)
leftLandmark = [Elandmark(2)+varv(1,1),Elandmark(1)+varv(1,2)];
rightLandmark = [Dlandmark(2)+varv(1,1),Dlandmark(1)+varv(1,2)];
superiorLandmark = [newposIlandmark(2)+varv(1,1),newposIlandmark(1)+varv(1,2)];
inferiorLandmark = [newposSlandmark(2)+varv(1,1),newposSlandmark(1)+varv(1,2)];
landCoord = [leftLandmark, rightLandmark, superiorLandmark, inferiorLandmark];
else
leftLandmark = [Elandmark(2)+varv(1,1),Elandmark(1)+varv(1,2)];
rightLandmark = [Dlandmark(2)+varv(1,1),Dlandmark(1)+varv(1,2)];
superiorLandmark = [Slandmark(2)+varv(1,1),Slandmark(1)+varv(1,2)];
inferiorLandmark = [Ilandmark(2)+varv(1,1),Ilandmark(1)+varv(1,2)];
landCoord = [leftLandmark, rightLandmark, superiorLandmark, inferiorLandmark];
end
end
if (landcont == 5)
Elandmark = V(1,:);
Dlandmark = V(2,:);
Slandmark = V(3,:);
Ilandmark = V(4,:);
newposIlandmark = V(5,:);
newposSlandmark = V(6,:);
existe = CONT(2);
de2 = CONT(3);
if (existe == 1)
leftLandmark = [Elandmark(2)+varv(1,1),Elandmark(1)+varv(1,2)];
rightLandmark = [Dlandmark(2)+varv(1,1),Dlandmark(1)+varv(1,2)];
inferiorLandmark = [newposIlandmark(2)+varv(1,1),newposIlandmark(1)+varv(1,2)];
superiorLandmark = [newposSlandmark(2)+varv(1,1),newposSlandmark(1)+varv(1,2)];
centralLandmark = [newposSlandmark(2)+varv(1,1),newposSlandmark(1)+varv(1,2)+de2];
landCoord = [leftLandmark, rightLandmark, superiorLandmark, inferiorLandmark, centralLandmark];
else
leftLandmark = [Elandmark(2)+varv(1,1),Elandmark(1)+varv(1,2)];
rightLandmark = [Dlandmark(2)+varv(1,1),Dlandmark(1)+varv(1,2)];
inferiorLandmark = [Slandmark(2)+varv(1,1),Slandmark(1)+varv(1,2)];
superiorLandmark = [Ilandmark(2)+varv(1,1),Ilandmark(1)+varv(1,2)];
centralLandmark = [Slandmark(2)+varv(1,1),Slandmark(1)+varv(1,2)+de2];
landCoord = [leftLandmark, rightLandmark, superiorLandmark, inferiorLandmark, centralLandmark];
end
end
if (landcont == 2)
Elandmark = V(1,:);
Dlandmark = V(2,:);
leftLandmark = [Elandmark(2)+varv(1,1),Elandmark(1)+varv(1,2)];
rightLandmark = [Dlandmark(2)+varv(1,1),Dlandmark(1)+varv(1,2)];
landCoord = [leftLandmark, rightLandmark];
end
end