![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include "util/testing.h"#include "base/camera_models.h"#include "base/correspondence_graph.h"#include "base/pose.h"#include "base/reconstruction.h"#include "base/similarity_transform.h"
Go to the source code of this file.
Macros | |
| #define | TEST_NAME "base/reconstruction" |
Functions | |
| void | GenerateReconstruction (const image_t num_images, Reconstruction *reconstruction, CorrespondenceGraph *correspondence_graph) |
| BOOST_AUTO_TEST_CASE (TestEmpty) | |
| BOOST_AUTO_TEST_CASE (TestAddCamera) | |
| BOOST_AUTO_TEST_CASE (TestAddImage) | |
| BOOST_AUTO_TEST_CASE (TestAddPoint3D) | |
| BOOST_AUTO_TEST_CASE (TestAddObservation) | |
| BOOST_AUTO_TEST_CASE (TestMergePoints3D) | |
| BOOST_AUTO_TEST_CASE (TestDeletePoint3D) | |
| BOOST_AUTO_TEST_CASE (TestDeleteObservation) | |
| BOOST_AUTO_TEST_CASE (TestRegisterImage) | |
| BOOST_AUTO_TEST_CASE (TestNormalize) | |
| BOOST_AUTO_TEST_CASE (TestComputeBoundsAndCentroid) | |
| BOOST_AUTO_TEST_CASE (TestCrop) | |
| BOOST_AUTO_TEST_CASE (TestTransform) | |
| BOOST_AUTO_TEST_CASE (TestFindImageWithName) | |
| BOOST_AUTO_TEST_CASE (TestFilterPoints3D) | |
| BOOST_AUTO_TEST_CASE (TestFilterPoints3DInImages) | |
| BOOST_AUTO_TEST_CASE (TestFilterAllPoints) | |
| BOOST_AUTO_TEST_CASE (TestFilterObservationsWithNegativeDepth) | |
| BOOST_AUTO_TEST_CASE (TestFilterImages) | |
| BOOST_AUTO_TEST_CASE (TestComputeNumObservations) | |
| BOOST_AUTO_TEST_CASE (TestComputeMeanTrackLength) | |
| BOOST_AUTO_TEST_CASE (TestComputeMeanObservationsPerRegImage) | |
| BOOST_AUTO_TEST_CASE (TestComputeMeanReprojectionError) | |
| #define TEST_NAME "base/reconstruction" |
Definition at line 32 of file reconstruction_test.cc.
| BOOST_AUTO_TEST_CASE | ( | TestAddCamera | ) |
Definition at line 77 of file reconstruction_test.cc.
References colmap::Reconstruction::AddCamera(), colmap::Reconstruction::Camera(), colmap::Camera::CameraId(), colmap::Reconstruction::Cameras(), colmap::Reconstruction::ExistsCamera(), colmap::Camera::InitializeWithId(), colmap::SimplePinholeCameraModel::model_id, colmap::Reconstruction::NumCameras(), colmap::Reconstruction::NumImagePairs(), colmap::Reconstruction::NumImages(), colmap::Reconstruction::NumPoints3D(), colmap::Reconstruction::NumRegImages(), and colmap::Camera::SetCameraId().
| BOOST_AUTO_TEST_CASE | ( | TestAddImage | ) |
Definition at line 95 of file reconstruction_test.cc.
References colmap::Reconstruction::AddImage(), colmap::Reconstruction::ExistsImage(), image, colmap::Reconstruction::Image(), colmap::Image::ImageId(), colmap::Reconstruction::Images(), colmap::Image::IsRegistered(), colmap::Reconstruction::NumCameras(), colmap::Reconstruction::NumImagePairs(), colmap::Reconstruction::NumImages(), colmap::Reconstruction::NumPoints3D(), and colmap::Reconstruction::NumRegImages().
| BOOST_AUTO_TEST_CASE | ( | TestAddObservation | ) |
Definition at line 128 of file reconstruction_test.cc.
References colmap::Track::AddElement(), colmap::Reconstruction::AddObservation(), colmap::Reconstruction::AddPoint3D(), GenerateReconstruction(), colmap::Point2D::HasPoint3D(), colmap::Reconstruction::Image(), colmap::Track::Length(), colmap::Image::NumPoints3D(), colmap::Image::Point2D(), colmap::Reconstruction::Point3D(), and colmap::Point3D::Track().
| BOOST_AUTO_TEST_CASE | ( | TestAddPoint3D | ) |
Definition at line 112 of file reconstruction_test.cc.
References colmap::Reconstruction::AddPoint3D(), colmap::Reconstruction::ExistsPoint3D(), colmap::Track::Length(), colmap::Reconstruction::NumCameras(), colmap::Reconstruction::NumImagePairs(), colmap::Reconstruction::NumImages(), colmap::Reconstruction::NumPoints3D(), colmap::Reconstruction::NumRegImages(), colmap::Reconstruction::Point3D(), colmap::Reconstruction::Point3DIds(), colmap::Reconstruction::Points3D(), and colmap::Point3D::Track().
| BOOST_AUTO_TEST_CASE | ( | TestComputeBoundsAndCentroid | ) |
Definition at line 288 of file reconstruction_test.cc.
References colmap::Reconstruction::AddPoint3D(), colmap::Reconstruction::ComputeBoundingBox(), colmap::Reconstruction::ComputeCentroid(), and e.
| BOOST_AUTO_TEST_CASE | ( | TestComputeMeanObservationsPerRegImage | ) |
Definition at line 583 of file reconstruction_test.cc.
References colmap::Reconstruction::AddObservation(), colmap::Reconstruction::AddPoint3D(), colmap::Reconstruction::ComputeMeanObservationsPerRegImage(), and GenerateReconstruction().
| BOOST_AUTO_TEST_CASE | ( | TestComputeMeanReprojectionError | ) |
Definition at line 599 of file reconstruction_test.cc.
References colmap::Reconstruction::AddPoint3D(), colmap::Reconstruction::ComputeMeanReprojectionError(), GenerateReconstruction(), colmap::Reconstruction::Point3D(), and colmap::Point3D::SetError().
| BOOST_AUTO_TEST_CASE | ( | TestComputeMeanTrackLength | ) |
Definition at line 567 of file reconstruction_test.cc.
References colmap::Reconstruction::AddObservation(), colmap::Reconstruction::AddPoint3D(), colmap::Reconstruction::ComputeMeanTrackLength(), and GenerateReconstruction().
| BOOST_AUTO_TEST_CASE | ( | TestComputeNumObservations | ) |
Definition at line 552 of file reconstruction_test.cc.
References colmap::Reconstruction::AddObservation(), colmap::Reconstruction::AddPoint3D(), colmap::Reconstruction::ComputeNumObservations(), and GenerateReconstruction().
| BOOST_AUTO_TEST_CASE | ( | TestCrop | ) |
Definition at line 321 of file reconstruction_test.cc.
References colmap::Reconstruction::AddObservation(), colmap::Reconstruction::AddPoint3D(), colmap::Reconstruction::Crop(), GenerateReconstruction(), colmap::Reconstruction::IsImageRegistered(), colmap::Reconstruction::NumCameras(), colmap::Reconstruction::NumImages(), colmap::Reconstruction::NumPoints3D(), and colmap::Reconstruction::NumRegImages().
| BOOST_AUTO_TEST_CASE | ( | TestDeleteObservation | ) |
Definition at line 195 of file reconstruction_test.cc.
References colmap::Reconstruction::AddObservation(), colmap::Reconstruction::AddPoint3D(), colmap::Reconstruction::DeleteObservation(), colmap::Reconstruction::ExistsPoint3D(), GenerateReconstruction(), colmap::Point2D::HasPoint3D(), colmap::Reconstruction::Image(), colmap::Track::Length(), colmap::Image::Point2D(), colmap::Reconstruction::Point3D(), and colmap::Point3D::Track().
| BOOST_AUTO_TEST_CASE | ( | TestDeletePoint3D | ) |
Definition at line 183 of file reconstruction_test.cc.
References colmap::Reconstruction::AddObservation(), colmap::Reconstruction::AddPoint3D(), colmap::Reconstruction::DeletePoint3D(), colmap::Reconstruction::ExistsPoint3D(), GenerateReconstruction(), colmap::Reconstruction::Image(), and colmap::Image::NumPoints3D().
| BOOST_AUTO_TEST_CASE | ( | TestEmpty | ) |
Definition at line 68 of file reconstruction_test.cc.
References colmap::Reconstruction::NumCameras(), colmap::Reconstruction::NumImagePairs(), colmap::Reconstruction::NumImages(), colmap::Reconstruction::NumPoints3D(), and colmap::Reconstruction::NumRegImages().
| BOOST_AUTO_TEST_CASE | ( | TestFilterAllPoints | ) |
Definition at line 479 of file reconstruction_test.cc.
References colmap::Reconstruction::AddObservation(), colmap::Reconstruction::AddPoint3D(), e, colmap::Reconstruction::FilterAllPoints3D(), GenerateReconstruction(), and colmap::Reconstruction::NumPoints3D().
| BOOST_AUTO_TEST_CASE | ( | TestFilterImages | ) |
Definition at line 534 of file reconstruction_test.cc.
References colmap::Reconstruction::AddObservation(), colmap::Reconstruction::AddPoint3D(), colmap::Reconstruction::DeleteObservation(), colmap::Reconstruction::FilterImages(), GenerateReconstruction(), and colmap::Reconstruction::NumRegImages().
| BOOST_AUTO_TEST_CASE | ( | TestFilterObservationsWithNegativeDepth | ) |
Definition at line 510 of file reconstruction_test.cc.
References colmap::Reconstruction::AddObservation(), colmap::Reconstruction::AddPoint3D(), colmap::Reconstruction::FilterObservationsWithNegativeDepth(), GenerateReconstruction(), colmap::Reconstruction::NumPoints3D(), colmap::Reconstruction::Point3D(), and colmap::Point3D::XYZ().
| BOOST_AUTO_TEST_CASE | ( | TestFilterPoints3D | ) |
Definition at line 394 of file reconstruction_test.cc.
References colmap::Reconstruction::AddObservation(), colmap::Reconstruction::AddPoint3D(), e, colmap::Reconstruction::FilterPoints3D(), GenerateReconstruction(), and colmap::Reconstruction::NumPoints3D().
| BOOST_AUTO_TEST_CASE | ( | TestFilterPoints3DInImages | ) |
Definition at line 437 of file reconstruction_test.cc.
References colmap::Reconstruction::AddObservation(), colmap::Reconstruction::AddPoint3D(), e, colmap::Reconstruction::FilterPoints3DInImages(), GenerateReconstruction(), and colmap::Reconstruction::NumPoints3D().
| BOOST_AUTO_TEST_CASE | ( | TestFindImageWithName | ) |
Definition at line 383 of file reconstruction_test.cc.
References colmap::Reconstruction::FindImageWithName(), GenerateReconstruction(), and colmap::Reconstruction::Image().
| BOOST_AUTO_TEST_CASE | ( | TestMergePoints3D | ) |
Definition at line 147 of file reconstruction_test.cc.
References colmap::Reconstruction::AddObservation(), colmap::Reconstruction::AddPoint3D(), colmap::Point3D::Color(), colmap::Reconstruction::ExistsPoint3D(), GenerateReconstruction(), colmap::Reconstruction::Image(), colmap::Reconstruction::MergePoints3D(), colmap::Image::Point2D(), colmap::Reconstruction::Point3D(), colmap::Point2D::Point3DId(), and colmap::Point3D::XYZ().
| BOOST_AUTO_TEST_CASE | ( | TestNormalize | ) |
Definition at line 230 of file reconstruction_test.cc.
References colmap::Reconstruction::AddImage(), colmap::Reconstruction::DeRegisterImage(), e, GenerateReconstruction(), image, colmap::Reconstruction::Image(), colmap::Reconstruction::Normalize(), colmap::Reconstruction::RegisterImage(), and colmap::Image::Tvec().
| BOOST_AUTO_TEST_CASE | ( | TestRegisterImage | ) |
Definition at line 213 of file reconstruction_test.cc.
References colmap::Reconstruction::DeRegisterImage(), GenerateReconstruction(), colmap::Reconstruction::Image(), colmap::Reconstruction::IsImageRegistered(), colmap::Image::IsRegistered(), colmap::Reconstruction::NumRegImages(), and colmap::Reconstruction::RegisterImage().
| BOOST_AUTO_TEST_CASE | ( | TestTransform | ) |
Definition at line 367 of file reconstruction_test.cc.
References colmap::Reconstruction::AddObservation(), colmap::Reconstruction::AddPoint3D(), colmap::ComposeIdentityQuaternion(), GenerateReconstruction(), colmap::Reconstruction::Image(), colmap::Reconstruction::Point3D(), colmap::Image::ProjectionCenter(), colmap::Reconstruction::Transform(), and colmap::Point3D::XYZ().
| void GenerateReconstruction | ( | const image_t | num_images, |
| Reconstruction * | reconstruction, | ||
| CorrespondenceGraph * | correspondence_graph | ||
| ) |
Definition at line 43 of file reconstruction_test.cc.
References colmap::Reconstruction::AddCamera(), colmap::Reconstruction::AddImage(), colmap::CorrespondenceGraph::AddImage(), image, colmap::Camera::InitializeWithName(), colmap::Reconstruction::RegisterImage(), colmap::Camera::SetCameraId(), colmap::Reconstruction::SetUp(), and patch::to_string().
Referenced by BOOST_AUTO_TEST_CASE().