www.pudn.com > calibr8.zip > DLTpoints.m


function points = DLTpoints(DLT, icoords, z)
%DEVELOPMENT PHASE
%
%get the point corresponding to the image positions icoords with the given z
%coordinate
%
%DLT ... 3 x 4
%icoords ... n x 2
%default z = 0
%
%points = n x 3

if (nargin < 3)
    z = 0;
end

n = size(icoords, 1);

tempDLT = DLT(:, [1 2 4]);
tempDLT(:, 3) = tempDLT(:, 3) + z * DLT(:, 3);

points = applyDLT(inv(tempDLT), icoords);
points = [points, z * ones(n, 1)];