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
| function[G]=versant(X,A,B,D,o,m,E,BordsImage,DataElev,q)
v=1;
for k=o-v:o+v
for l=m-v:m+v
if X(1,3)<D(90-k,l)
for f=90-k-1:90-k+1
for h=l-1:l+1
if (A(90-k)-X(1,1))^2+(B(l)-X(1,2))^2+(D(90-k,l)-X(1,3))^2>(A(90-k)-A(90-f))^2+(B(l)-B(h))^2+(D(90-k,l)-D(f,h))^2
G(q,1)=A(90-k);
G(q,2)=B(l);
G(q,3)=D(90-k,l);
P(1,1)=G(q,1);
P(1,2)=G(q,2);
P(1,3)=G(q,3);
q=q+1;
[P,o,m]=assimilationpoint2(P,BordsImage,D);
G=versant2(P,A,B,D,o,m,E,BordsImage,DataElev,q);
%else
end
end
end
end
end
end
end |
Partager