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


function [CDLTn, nIp, ndiff] = noisifyCDLT( CDLT, Sp, noiseF )
%
% CDLTn = noisifyCDLT( CDLT, Sp, noiseF )
%
% adds a random noise to the ideal CDLT matrix
%
% CDLT - 3 by 3 CDLT matrix
% Sp - scene points coordinates of the coplanar calibration grid
% noiseF - noise factor in percents (0 - 1)

Ip = CDLT * hext( Sp )';
Ip = hnorm( Ip' );

[n m] = size( Ip );
RM = noiseF * randn( n, m );
nIp = Ip + RM;

ndiff = nIp - Ip;

PC(:,1:2) = Sp;
PC(:,3:4) = nIp;

CDLTn = estiCDLT( PC );