"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "macros/KRC_from_P.sci" between
sip-0.5.6.tar.gz and sip-0.12.1.tar.gz

About: SIP (Scilab Image Processing) toolbox to do imaging tasks such as filtering, blurring, edge detection, thresholding, histogram manipulation, segmentation, mathematical morphology, color image processing, etc.

KRC_from_P.sci  (sip-0.5.6):KRC_from_P.sci  (sip-0.12.1)
skipping to change at line 22 skipping to change at line 22
// $Revision: 1.1 $ $Date: 2010-10-09 14:46:33 $ // $Revision: 1.1 $ $Date: 2010-10-09 14:46:33 $
// //
N = size(P,1); N = size(P,1);
H = P(:,1:N); H = P(:,1:N);
[K,R] = sip_rq(H); [K,R] = sip_rq(H);
if argn(2) < 2 if argn(2) < 2
K = K / K(N,N); K = K / K(N,N);
if K(1,1) < 0 // if K(1,1) < 0
D = diag([-1 -1 ones(1,N-2)]); // D = diag([-1 -1 ones(1,N-2)]);
K = K * D; // K = K * D;
R = D * R; // R = D * R;
// test = K*R; // test = K*R;
// vgg_assert0(test/test(1,1) - H/H(1,1), 1e-07) // vgg_assert0(test/test(1,1) - H/H(1,1), 1e-07)
end // end
// from http://ksimek.github.io/2012/08/14/decompose/
// make diagonal of K positive
sg = diag(sign(diag(K)));
K = K * sg;
R = sg * R;
// det(R) negative, just invert - the proj equation remains same:
R = -R
end end
if argn(1) > 2 if argn(1) > 2
C = -P(:,1:N)\P(:,$); C = -P(:,1:N)\P(:,$);
end end
endfunction endfunction
// //
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
// SIP - Scilab Image Processing toolbox // SIP - Scilab Image Processing toolbox
// Copyright (C) 2002-2010 Ricardo Fabbri // Copyright (C) 2002-2010 Ricardo Fabbri
 End of changes. 2 change blocks. 
5 lines changed or deleted 13 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS