![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <database.h>
Public Member Functions | |
| Database () | |
| Database (const std::string &path) | |
| ~Database () | |
| void | Open (const std::string &path) |
| void | Close () |
| bool | ExistsCamera (const camera_t camera_id) const |
| bool | ExistsImage (const image_t image_id) const |
| bool | ExistsImageWithName (std::string name) const |
| bool | ExistsKeypoints (const image_t image_id) const |
| bool | ExistsDescriptors (const image_t image_id) const |
| bool | ExistsMatches (const image_t image_id1, const image_t image_id2) const |
| bool | ExistsInlierMatches (const image_t image_id1, const image_t image_id2) const |
| size_t | NumCameras () const |
| size_t | NumImages () const |
| size_t | NumKeypoints () const |
| size_t | MaxNumKeypoints () const |
| size_t | NumKeypointsForImage (const image_t image_id) const |
| size_t | NumDescriptors () const |
| size_t | MaxNumDescriptors () const |
| size_t | NumDescriptorsForImage (const image_t image_id) const |
| size_t | NumMatches () const |
| size_t | NumInlierMatches () const |
| size_t | NumMatchedImagePairs () const |
| size_t | NumVerifiedImagePairs () const |
| Camera | ReadCamera (const camera_t camera_id) const |
| std::vector< Camera > | ReadAllCameras () const |
| Image | ReadImage (const image_t image_id) const |
| Image | ReadImageWithName (const std::string &name) const |
| std::vector< Image > | ReadAllImages () const |
| FeatureKeypoints | ReadKeypoints (const image_t image_id) const |
| FeatureDescriptors | ReadDescriptors (const image_t image_id) const |
| FeatureMatches | ReadMatches (const image_t image_id1, const image_t image_id2) const |
| std::vector< std::pair< image_pair_t, FeatureMatches > > | ReadAllMatches () const |
| TwoViewGeometry | ReadTwoViewGeometry (const image_t image_id1, const image_t image_id2) const |
| void | ReadTwoViewGeometries (std::vector< image_pair_t > *image_pair_ids, std::vector< TwoViewGeometry > *two_view_geometries) const |
| void | ReadTwoViewGeometryNumInliers (std::vector< std::pair< image_t, image_t >> *image_pairs, std::vector< int > *num_inliers) const |
| camera_t | WriteCamera (const Camera &camera, const bool use_camera_id=false) const |
| image_t | WriteImage (const Image &image, const bool use_image_id=false) const |
| void | WriteKeypoints (const image_t image_id, const FeatureKeypoints &keypoints) const |
| void | WriteDescriptors (const image_t image_id, const FeatureDescriptors &descriptors) const |
| void | WriteMatches (const image_t image_id1, const image_t image_id2, const FeatureMatches &matches) const |
| void | WriteTwoViewGeometry (const image_t image_id1, const image_t image_id2, const TwoViewGeometry &two_view_geometry) const |
| void | UpdateCamera (const Camera &camera) const |
| void | UpdateImage (const Image &image) const |
| void | DeleteMatches (const image_t image_id1, const image_t image_id2) const |
| void | DeleteInlierMatches (const image_t image_id1, const image_t image_id2) const |
| void | ClearAllTables () const |
| void | ClearCameras () const |
| void | ClearImages () const |
| void | ClearDescriptors () const |
| void | ClearKeypoints () const |
| void | ClearMatches () const |
| void | ClearTwoViewGeometries () const |
Static Public Member Functions | |
| static image_pair_t | ImagePairToPairId (const image_t image_id1, const image_t image_id2) |
| static void | PairIdToImagePair (const image_pair_t pair_id, image_t *image_id1, image_t *image_id2) |
| static bool | SwapImagePair (const image_t image_id1, const image_t image_id2) |
| static void | Merge (const Database &database1, const Database &database2, Database *merged_database) |
Static Public Attributes | |
| const static int | kSchemaVersion = 1 |
| const static size_t | kMaxNumImages |
| colmap::Database::Database | ( | ) |
|
explicit |
References Open(), and cloudViewer::t::geometry::path.
| colmap::Database::~Database | ( | ) |
References Close().
| void colmap::Database::ClearAllTables | ( | ) | const |
References ClearCameras(), ClearDescriptors(), ClearImages(), ClearKeypoints(), ClearMatches(), and ClearTwoViewGeometries().
Referenced by BOOST_AUTO_TEST_CASE(), and colmap::RunDatabaseCleaner().
| void colmap::Database::ClearCameras | ( | ) | const |
References SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), and ClearAllTables().
| void colmap::Database::ClearDescriptors | ( | ) | const |
References SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), ClearAllTables(), and colmap::RunDatabaseCleaner().
| void colmap::Database::ClearImages | ( | ) | const |
References SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), ClearAllTables(), and colmap::RunDatabaseCleaner().
| void colmap::Database::ClearKeypoints | ( | ) | const |
References SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), ClearAllTables(), and colmap::RunDatabaseCleaner().
| void colmap::Database::ClearMatches | ( | ) | const |
References SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), ClearAllTables(), and colmap::RunDatabaseCleaner().
| void colmap::Database::ClearTwoViewGeometries | ( | ) | const |
References SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), ClearAllTables(), and colmap::RunDatabaseCleaner().
| void colmap::Database::Close | ( | ) |
References SQLITE3_EXEC.
Referenced by BOOST_AUTO_TEST_CASE(), Open(), and ~Database().
| void colmap::Database::DeleteInlierMatches | ( | const image_t | image_id1, |
| const image_t | image_id2 | ||
| ) | const |
References ImagePairToPairId(), and SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), and colmap::FeatureMatcherCache::DeleteInlierMatches().
References ImagePairToPairId(), and SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), and colmap::FeatureMatcherCache::DeleteMatches().
| bool colmap::Database::ExistsCamera | ( | const camera_t | camera_id | ) | const |
Referenced by BOOST_AUTO_TEST_CASE(), and WriteCamera().
| bool colmap::Database::ExistsDescriptors | ( | const image_t | image_id | ) | const |
Referenced by colmap::ImageReader::Next(), and colmap::FeatureMatcherCache::Setup().
| bool colmap::Database::ExistsImage | ( | const image_t | image_id | ) | const |
Referenced by BOOST_AUTO_TEST_CASE(), and WriteImage().
| bool colmap::Database::ExistsImageWithName | ( | std::string | name | ) | const |
References name.
Referenced by Merge(), colmap::ImageReader::Next(), and colmap::Reconstruction::TranscribeImageIdsToDatabase().
| bool colmap::Database::ExistsInlierMatches | ( | const image_t | image_id1, |
| const image_t | image_id2 | ||
| ) | const |
References ImagePairToPairId().
Referenced by colmap::FeatureMatcherCache::ExistsInlierMatches(), and colmap::TwoViewGeometriesTab::Reload().
| bool colmap::Database::ExistsKeypoints | ( | const image_t | image_id | ) | const |
Referenced by colmap::ImageReader::Next(), and colmap::FeatureMatcherCache::Setup().
References ImagePairToPairId().
Referenced by BOOST_AUTO_TEST_CASE(), colmap::FeatureMatcherCache::ExistsMatches(), and colmap::MatchesTab::Reload().
|
inlinestatic |
References kMaxNumImages, and SwapImagePair().
Referenced by colmap::CorrespondenceGraph::AddCorrespondences(), BOOST_AUTO_TEST_CASE(), DeleteInlierMatches(), DeleteMatches(), ExistsInlierMatches(), ExistsMatches(), colmap::IncrementalMapper::FindInitialImagePair(), colmap::Reconstruction::ImagePair(), colmap::SiftFeatureMatcher::Match(), colmap::CorrespondenceGraph::NumCorrespondencesBetweenImages(), ReadMatches(), ReadTwoViewGeometry(), colmap::IncrementalMapper::RegisterInitialImagePair(), WriteMatches(), and WriteTwoViewGeometry().
| size_t colmap::Database::MaxNumDescriptors | ( | ) | const |
Referenced by BOOST_AUTO_TEST_CASE().
| size_t colmap::Database::MaxNumKeypoints | ( | ) | const |
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
References descriptors, ExistsImageWithName(), image, PairIdToImagePair(), ReadAllCameras(), ReadAllImages(), ReadAllMatches(), ReadDescriptors(), ReadKeypoints(), ReadTwoViewGeometries(), WriteCamera(), WriteDescriptors(), WriteImage(), WriteKeypoints(), WriteMatches(), and WriteTwoViewGeometry().
Referenced by BOOST_AUTO_TEST_CASE(), and colmap::RunDatabaseMerger().
| size_t colmap::Database::NumCameras | ( | ) | const |
Referenced by BOOST_AUTO_TEST_CASE(), colmap::CameraTab::Reload(), and cloudViewer::CameraTab::Reload().
| size_t colmap::Database::NumDescriptors | ( | ) | const |
Referenced by BOOST_AUTO_TEST_CASE().
| size_t colmap::Database::NumDescriptorsForImage | ( | const image_t | image_id | ) | const |
Referenced by BOOST_AUTO_TEST_CASE().
| size_t colmap::Database::NumImages | ( | ) | const |
| size_t colmap::Database::NumInlierMatches | ( | ) | const |
Referenced by BOOST_AUTO_TEST_CASE(), and ReadTwoViewGeometryNumInliers().
| size_t colmap::Database::NumKeypoints | ( | ) | const |
Referenced by BOOST_AUTO_TEST_CASE(), colmap::ImageTab::Reload(), and cloudViewer::ImageTab::Reload().
| size_t colmap::Database::NumKeypointsForImage | ( | const image_t | image_id | ) | const |
Referenced by BOOST_AUTO_TEST_CASE().
| size_t colmap::Database::NumMatchedImagePairs | ( | ) | const |
Referenced by BOOST_AUTO_TEST_CASE().
| size_t colmap::Database::NumMatches | ( | ) | const |
Referenced by BOOST_AUTO_TEST_CASE().
| size_t colmap::Database::NumVerifiedImagePairs | ( | ) | const |
Referenced by BOOST_AUTO_TEST_CASE().
| void colmap::Database::Open | ( | const std::string & | path | ) |
References Close(), cloudViewer::t::geometry::path, SQLITE3_CALL, and SQLITE3_EXEC.
Referenced by Database().
|
inlinestatic |
References kMaxNumImages.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::DatabaseCache::Load(), Merge(), ReadTwoViewGeometryNumInliers(), and colmap::IncrementalTriangulator::Retriangulate().
| std::vector< Camera > colmap::Database::ReadAllCameras | ( | ) | const |
References SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::DatabaseCache::Load(), Merge(), colmap::CameraTab::Reload(), and cloudViewer::CameraTab::Reload().
| std::vector< Image > colmap::Database::ReadAllImages | ( | ) | const |
| std::vector< std::pair< image_pair_t, FeatureMatches > > colmap::Database::ReadAllMatches | ( | ) | const |
References SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), and Merge().
References SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), and colmap::ImageReader::Next().
| FeatureDescriptors colmap::Database::ReadDescriptors | ( | const image_t | image_id | ) | const |
References descriptors, and SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), Merge(), colmap::RunVocabTreeRetriever(), and colmap::FeatureMatcherCache::Setup().
References image, and SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE().
| Image colmap::Database::ReadImageWithName | ( | const std::string & | name | ) | const |
References image, name, and SQLITE3_CALL.
Referenced by colmap::ImageReader::Next(), and colmap::Reconstruction::TranscribeImageIdsToDatabase().
| FeatureKeypoints colmap::Database::ReadKeypoints | ( | const image_t | image_id | ) | const |
| FeatureMatches colmap::Database::ReadMatches | ( | const image_t | image_id1, |
| const image_t | image_id2 | ||
| ) | const |
References ImagePairToPairId(), SQLITE3_CALL, and SwapImagePair().
Referenced by BOOST_AUTO_TEST_CASE(), colmap::FeatureMatcherCache::GetMatches(), and colmap::MatchesTab::Reload().
| void colmap::Database::ReadTwoViewGeometries | ( | std::vector< image_pair_t > * | image_pair_ids, |
| std::vector< TwoViewGeometry > * | two_view_geometries | ||
| ) | const |
References colmap::TwoViewGeometry::config, colmap::TwoViewGeometry::E, colmap::TwoViewGeometry::F, colmap::TwoViewGeometry::H, colmap::TwoViewGeometry::inlier_matches, colmap::TwoViewGeometry::qvec, SQLITE3_CALL, and colmap::TwoViewGeometry::tvec.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::DatabaseCache::Load(), and Merge().
| TwoViewGeometry colmap::Database::ReadTwoViewGeometry | ( | const image_t | image_id1, |
| const image_t | image_id2 | ||
| ) | const |
References colmap::TwoViewGeometry::config, colmap::TwoViewGeometry::E, colmap::TwoViewGeometry::F, colmap::TwoViewGeometry::H, ImagePairToPairId(), colmap::TwoViewGeometry::inlier_matches, colmap::TwoViewGeometry::Invert(), colmap::TwoViewGeometry::qvec, SQLITE3_CALL, SwapImagePair(), and colmap::TwoViewGeometry::tvec.
Referenced by BOOST_AUTO_TEST_CASE(), and colmap::TwoViewGeometriesTab::Reload().
| void colmap::Database::ReadTwoViewGeometryNumInliers | ( | std::vector< std::pair< image_t, image_t >> * | image_pairs, |
| std::vector< int > * | num_inliers | ||
| ) | const |
References NumInlierMatches(), PairIdToImagePair(), and SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::SceneClustering::Create(), colmap::MatchMatrixWidget::Show(), and cloudViewer::MatchMatrixWidget::Show().
|
inlinestatic |
Referenced by BOOST_AUTO_TEST_CASE(), ImagePairToPairId(), ReadMatches(), ReadTwoViewGeometry(), WriteMatches(), and WriteTwoViewGeometry().
| void colmap::Database::UpdateCamera | ( | const Camera & | camera | ) | const |
| void colmap::Database::UpdateImage | ( | const Image & | image | ) | const |
References image, and SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE().
| camera_t colmap::Database::WriteCamera | ( | const Camera & | camera, |
| const bool | use_camera_id = false |
||
| ) | const |
References colmap::Camera::CameraId(), ExistsCamera(), colmap::Camera::HasPriorFocalLength(), colmap::Camera::Height(), colmap::Camera::ModelId(), colmap::Camera::NumParams(), colmap::Camera::ParamsData(), SQLITE3_CALL, and colmap::Camera::Width().
Referenced by BOOST_AUTO_TEST_CASE(), Merge(), and colmap::ImageReader::Next().
| void colmap::Database::WriteDescriptors | ( | const image_t | image_id, |
| const FeatureDescriptors & | descriptors | ||
| ) | const |
References descriptors, and SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), and Merge().
References ExistsImage(), image, and SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), and Merge().
| void colmap::Database::WriteKeypoints | ( | const image_t | image_id, |
| const FeatureKeypoints & | keypoints | ||
| ) | const |
References SQLITE3_CALL.
Referenced by BOOST_AUTO_TEST_CASE(), and Merge().
| void colmap::Database::WriteMatches | ( | const image_t | image_id1, |
| const image_t | image_id2, | ||
| const FeatureMatches & | matches | ||
| ) | const |
References ImagePairToPairId(), SQLITE3_CALL, and SwapImagePair().
Referenced by BOOST_AUTO_TEST_CASE(), Merge(), and colmap::FeatureMatcherCache::WriteMatches().
| void colmap::Database::WriteTwoViewGeometry | ( | const image_t | image_id1, |
| const image_t | image_id2, | ||
| const TwoViewGeometry & | two_view_geometry | ||
| ) | const |
References colmap::TwoViewGeometry::config, colmap::TwoViewGeometry::E, colmap::TwoViewGeometry::F, colmap::TwoViewGeometry::H, ImagePairToPairId(), colmap::TwoViewGeometry::inlier_matches, colmap::TwoViewGeometry::Invert(), colmap::TwoViewGeometry::qvec, SQLITE3_CALL, SwapImagePair(), and colmap::TwoViewGeometry::tvec.
Referenced by BOOST_AUTO_TEST_CASE(), Merge(), and colmap::FeatureMatcherCache::WriteTwoViewGeometry().
|
static |
Referenced by BOOST_AUTO_TEST_CASE(), ImagePairToPairId(), and PairIdToImagePair().
|
static |