image thumbnail

image connectivity graph - SfM

by

 

This code developed to compute and visualize the connectivity between images in SfM

Tre=connectivity(vib,WPK,P)

function Tre=connectivity(vib,WPK,P)
  
    T=zeros(size(WPK,1),size(P,1)) ;Tre=[0 0];

for i=1:size(WPK,1)
    for j=1:1:size(vib,1)
    if vib(j,3)==2 && vib(j,1)==WPK(i,1) 
        T(WPK(i,1),vib(j,2))=1 ;
    else
    end
    end
end
 k=0;
 for i=1:size(T,1)-1
    for j=i+1:size(T,1)
        k=k+1;
         if   dot(T(i,:),T(j,:))>20
             Tre=[Tre;  i    j ];
        end
    end
 end
  

Contact us