www.gusucode.com > vision 源码程序 matlab案例代码 > vision/DetermineCameraPoseFromWorldtoImageCorrespondencesExample.m

    %% Determine Camera Pose from World-to-Image Correspondences
%
%%
% Load previously calculated world-to-image correspondences.
data = load('worldToImageCorrespondences.mat');
%%
% Estimate the world camera pose.
[worldOrientation,worldLocation] = estimateWorldCameraPose(...
     data.imagePoints,data.worldPoints,data.cameraParams);
%%
% Plot the world points.
 pcshow(data.worldPoints,'VerticalAxis','Y','VerticalAxisDir','down', ...
     'MarkerSize',30);
 hold on
 plotCamera('Size',10,'Orientation',worldOrientation,'Location',...
     worldLocation);
 hold off