structure2.m
上传用户:trade789
上传日期:2018-05-10
资源大小:603k
文件大小:1k
源码类别:

2D图形编程

开发平台:

Matlab

  1. xt= normalize(pt1(:,1:2)'-1,fc,cc,kc,alpha_c);
  2. xtt= normalize(pt2(:,1:2)'-1,fc,cc,kc,alpha_c);
  3. [T12,om12,X2,good_points,bad_points] = Motion_Structure_2views(xt,xtt,0);
  4. figure(3);
  5. plot3(X2(1,:),X2(3,:),-X2(2,:),'b+');
  6. for i=1:size(X2,2)
  7.     text(X2(1,i)+.2,X2(3,i),-X2(2,i),sprintf('%d',i),'color','m');
  8. end
  9.     
  10. hold off;
  11. %axis('equal');
  12. xlabel('X');ylabel('Z');zlabel('-Y');
  13. title('3D Structure from two views');
  14. rotate3d on;
  15. axis equal;
  16. ptx1 = project_points2(X2,zeros(3,1),zeros(3,1),fc,cc,kc,alpha_c);
  17. ptx2 = project_points2(X2,om12,T12,fc,cc,kc,alpha_c);
  18. plotpoints(pt1(good_points,:),img1,1);
  19. plotpoints(pt2(good_points,:),img2,1);