comparison UnitTestsSources/UnitTestsMain.cpp @ 165:8d50e6be565d wasm

LinearAlgebra toolbox
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 15 Feb 2018 13:51:29 +0100
parents 432b1f812d14
children ab9c799f5de1
comparison
equal deleted inserted replaced
164:432b1f812d14 165:8d50e6be565d
363 ASSERT_NEAR(-7.64234, camera.GetCenter() (1), 0.00001); 363 ASSERT_NEAR(-7.64234, camera.GetCenter() (1), 0.00001);
364 ASSERT_NEAR(2491.66, camera.GetCenter() (2), 0.01); 364 ASSERT_NEAR(2491.66, camera.GetCenter() (2), 0.01);
365 365
366 // Image plane that led to these parameters, with principal point at 366 // Image plane that led to these parameters, with principal point at
367 // (256,256). The image has dimensions 512x512. 367 // (256,256). The image has dimensions 512x512.
368 OrthancStone::Vector o, ax, ay; 368 OrthancStone::Vector o =
369 OrthancStone::LinearAlgebra::AssignVector(o, 7.009620, 2.521030, -821.942000); 369 OrthancStone::LinearAlgebra::CreateVector(7.009620, 2.521030, -821.942000);
370 OrthancStone::LinearAlgebra::AssignVector(ax, -0.453219, 0.891399, -0.001131 ); 370 OrthancStone::Vector ax =
371 OrthancStone::LinearAlgebra::AssignVector(ay, -0.891359, -0.453210, -0.008992); 371 OrthancStone::LinearAlgebra::CreateVector(-0.453219, 0.891399, -0.001131);
372 OrthancStone::Vector ay =
373 OrthancStone::LinearAlgebra::CreateVector(-0.891359, -0.453210, -0.008992);
374
372 OrthancStone::CoordinateSystem3D imagePlane(o, ax, ay); 375 OrthancStone::CoordinateSystem3D imagePlane(o, ax, ay);
373 376
374 // Back-projection of the principal point 377 // Back-projection of the principal point
375 { 378 {
376 OrthancStone::Vector ray = camera.GetRayDirection(256, 256); 379 OrthancStone::Vector ray = camera.GetRayDirection(256, 256);