comparison Framework/Toolbox/FiniteProjectiveCamera.cpp @ 189:964118e7e6de wasm

unit test for AlignVectorsWithRotation
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 16 Mar 2018 13:19:23 +0100
parents 45b03b04a777
children 371da7fe2c0e
comparison
equal deleted inserted replaced
188:45b03b04a777 189:964118e7e6de
251 LOG(ERROR) << "Camera lies on the image plane"; 251 LOG(ERROR) << "Camera lies on the image plane";
252 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); 252 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
253 } 253 }
254 254
255 Matrix a; 255 Matrix a;
256 LinearAlgebra::AlignVectorsWithRotation(a, camera - principalPoint, 256 GeometryToolbox::AlignVectorsWithRotation(a, camera - principalPoint,
257 LinearAlgebra::CreateVector(0, 0, -1)); 257 LinearAlgebra::CreateVector(0, 0, -1));
258 258
259 Matrix r = LinearAlgebra::Product(GeometryToolbox::CreateRotationMatrixAlongZ(angle), a); 259 Matrix r = LinearAlgebra::Product(GeometryToolbox::CreateRotationMatrixAlongZ(angle), a);
260 260
261 Matrix k = LinearAlgebra::ZeroMatrix(3, 3); 261 Matrix k = LinearAlgebra::ZeroMatrix(3, 3);
262 k(0,0) = focal / pixelSpacingX; 262 k(0,0) = focal / pixelSpacingX;