ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
colmap::Reconstruction Class Reference

#include <reconstruction.h>

Classes

struct  ImagePairStat
 

Public Member Functions

 Reconstruction ()
 
 Reconstruction (const Reconstruction &other)
 
Reconstructionoperator= (const Reconstruction &other)
 
size_t NumCameras () const
 
size_t NumImages () const
 
size_t NumRegImages () const
 
size_t NumPoints3D () const
 
size_t NumImagePairs () const
 
size_t NumAddedPoints3D () const
 
const class CameraCamera (const camera_t camera_id) const
 
const class ImageImage (const image_t image_id) const
 
const class Point3DPoint3D (const point3D_t point3D_id) const
 
const ImagePairStatImagePair (const image_pair_t pair_id) const
 
ImagePairStatImagePair (const image_t image_id1, const image_t image_id2)
 
class CameraCamera (const camera_t camera_id)
 
class ImageImage (const image_t image_id)
 
class Point3DPoint3D (const point3D_t point3D_id)
 
ImagePairStatImagePair (const image_pair_t pair_id)
 
const ImagePairStatImagePair (const image_t image_id1, const image_t image_id2) const
 
const std::unordered_map< camera_t, class Camera > & Cameras () const
 
const std::unordered_map< image_t, class Image > & Images () const
 
const std::vector< image_t > & RegImageIds () const
 
const std::unordered_map< point3D_t, class Point3D > & Points3D () const
 
const std::unordered_map< image_pair_t, ImagePairStat > & ImagePairs () const
 
std::unordered_set< point3D_tPoint3DIds () const
 
bool ExistsCamera (const camera_t camera_id) const
 
bool ExistsImage (const image_t image_id) const
 
bool ExistsPoint3D (const point3D_t point3D_id) const
 
bool ExistsImagePair (const image_pair_t pair_id) const
 
void Load (const DatabaseCache &database_cache)
 
void SetUp (const CorrespondenceGraph *correspondence_graph)
 
void TearDown ()
 
void AddCamera (const class Camera &camera)
 
void AddImage (const class Image &image)
 
point3D_t AddPoint3D (const Eigen::Vector3d &xyz, const Track &track, const Eigen::Vector3ub &color=Eigen::Vector3ub::Zero())
 
void AddObservation (const point3D_t point3D_id, const TrackElement &track_el)
 
point3D_t MergePoints3D (const point3D_t point3D_id1, const point3D_t point3D_id2)
 
void DeletePoint3D (const point3D_t point3D_id)
 
void DeleteObservation (const image_t image_id, const point2D_t point2D_idx)
 
void DeleteAllPoints2DAndPoints3D ()
 
void RegisterImage (const image_t image_id)
 
void DeRegisterImage (const image_t image_id)
 
bool IsImageRegistered (const image_t image_id) const
 
void Normalize (const double extent=10.0, const double p0=0.1, const double p1=0.9, const bool use_images=true)
 
Eigen::Vector3d ComputeCentroid (const double p0=0.1, const double p1=0.9) const
 
std::pair< Eigen::Vector3d, Eigen::Vector3d > ComputeBoundingBox (const double p0=0.0, const double p1=1.0) const
 
void Transform (const SimilarityTransform3 &tform)
 
Reconstruction Crop (const std::pair< Eigen::Vector3d, Eigen::Vector3d > &bbox) const
 
bool Merge (const Reconstruction &reconstruction, const double max_reproj_error)
 
template<bool kEstimateScale = true>
bool Align (const std::vector< std::string > &image_names, const std::vector< Eigen::Vector3d > &locations, const int min_common_images, SimilarityTransform3 *tform=nullptr)
 
template<bool kEstimateScale = true>
bool AlignRobust (const std::vector< std::string > &image_names, const std::vector< Eigen::Vector3d > &locations, const int min_common_images, const RANSACOptions &ransac_options, SimilarityTransform3 *tform=nullptr)
 
const class ImageFindImageWithName (const std::string &name) const
 
std::vector< image_tFindCommonRegImageIds (const Reconstruction &reconstruction) const
 
void TranscribeImageIdsToDatabase (const Database &database)
 
size_t FilterPoints3D (const double max_reproj_error, const double min_tri_angle, const std::unordered_set< point3D_t > &point3D_ids)
 
size_t FilterPoints3DInImages (const double max_reproj_error, const double min_tri_angle, const std::unordered_set< image_t > &image_ids)
 
size_t FilterAllPoints3D (const double max_reproj_error, const double min_tri_angle)
 
size_t FilterObservationsWithNegativeDepth ()
 
std::vector< image_tFilterImages (const double min_focal_length_ratio, const double max_focal_length_ratio, const double max_extra_param)
 
size_t ComputeNumObservations () const
 
double ComputeMeanTrackLength () const
 
double ComputeMeanObservationsPerRegImage () const
 
double ComputeMeanReprojectionError () const
 
void Read (const std::string &path)
 
void Write (const std::string &path) const
 
void ReadText (const std::string &path)
 
void ReadBinary (const std::string &path)
 
void WriteText (const std::string &path) const
 
void WriteBinary (const std::string &path) const
 
std::vector< PlyPointConvertToPLY () const
 
void ImportPLY (const std::string &path)
 
void ImportPLY (const std::vector< PlyPoint > &ply_points)
 
bool ExportNVM (const std::string &path, bool skip_distortion=false) const
 
bool ExportCam (const std::string &path, bool skip_distortion=false) const
 
bool ExportRecon3D (const std::string &path, bool skip_distortion=false) const
 
bool ExportBundler (const std::string &path, const std::string &list_path, bool skip_distortion=false) const
 
void ExportPLY (const std::string &path) const
 
void ExportVRML (const std::string &images_path, const std::string &points3D_path, const double image_scale, const Eigen::Vector3d &image_rgb) const
 
bool ExtractColorsForImage (const image_t image_id, const std::string &path)
 
void ExtractColorsForAllImages (const std::string &path)
 
void CreateImageDirs (const std::string &path) const
 
const CorrespondenceGraphGetCorrespondenceGraph () const
 
bool HasCorrespondenceGraph () const
 

Detailed Description

Definition at line 40 of file reconstruction.h.

Constructor & Destructor Documentation

◆ Reconstruction() [1/2]

colmap::Reconstruction::Reconstruction ( )

Definition at line 47 of file reconstruction.cc.

◆ Reconstruction() [2/2]

colmap::Reconstruction::Reconstruction ( const Reconstruction other)

Definition at line 50 of file reconstruction.cc.

Member Function Documentation

◆ AddCamera()

void colmap::Reconstruction::AddCamera ( const class Camera camera)

◆ AddImage()

void colmap::Reconstruction::AddImage ( const class Image image)

Definition at line 184 of file reconstruction.cc.

References ExistsImage(), and image.

Referenced by BOOST_AUTO_TEST_CASE(), Crop(), GenerateReconstruction(), Load(), and Merge().

◆ AddObservation()

◆ AddPoint3D()

◆ Align()

template<bool kEstimateScale>
bool colmap::Reconstruction::Align ( const std::vector< std::string > &  image_names,
const std::vector< Eigen::Vector3d > &  locations,
const int  min_common_images,
SimilarityTransform3 tform = nullptr 
)

◆ AlignRobust()

template<bool kEstimateScale>
bool colmap::Reconstruction::AlignRobust ( const std::vector< std::string > &  image_names,
const std::vector< Eigen::Vector3d > &  locations,
const int  min_common_images,
const RANSACOptions ransac_options,
SimilarityTransform3 tform = nullptr 
)

◆ Camera() [1/2]

class Camera & colmap::Reconstruction::Camera ( const camera_t  camera_id)
inline

Definition at line 473 of file reconstruction.h.

◆ Camera() [2/2]

◆ Cameras()

const std::unordered_map< camera_t, Camera > & colmap::Reconstruction::Cameras ( ) const
inline

◆ ComputeBoundingBox()

std::pair< Eigen::Vector3d, Eigen::Vector3d > colmap::Reconstruction::ComputeBoundingBox ( const double  p0 = 0.0,
const double  p1 = 1.0 
) const

◆ ComputeCentroid()

Eigen::Vector3d colmap::Reconstruction::ComputeCentroid ( const double  p0 = 0.1,
const double  p1 = 0.9 
) const

◆ ComputeMeanObservationsPerRegImage()

double colmap::Reconstruction::ComputeMeanObservationsPerRegImage ( ) const

◆ ComputeMeanReprojectionError()

double colmap::Reconstruction::ComputeMeanReprojectionError ( ) const

◆ ComputeMeanTrackLength()

double colmap::Reconstruction::ComputeMeanTrackLength ( ) const

◆ ComputeNumObservations()

◆ ConvertToPLY()

std::vector< PlyPoint > colmap::Reconstruction::ConvertToPLY ( ) const

◆ CreateImageDirs()

void colmap::Reconstruction::CreateImageDirs ( const std::string &  path) const

◆ Crop()

Reconstruction colmap::Reconstruction::Crop ( const std::pair< Eigen::Vector3d, Eigen::Vector3d > &  bbox) const

◆ DeleteAllPoints2DAndPoints3D()

◆ DeleteObservation()

void colmap::Reconstruction::DeleteObservation ( const image_t  image_id,
const point2D_t  point2D_idx 
)

◆ DeletePoint3D()

void colmap::Reconstruction::DeletePoint3D ( const point3D_t  point3D_id)

◆ DeRegisterImage()

void colmap::Reconstruction::DeRegisterImage ( const image_t  image_id)

◆ ExistsCamera()

bool colmap::Reconstruction::ExistsCamera ( const camera_t  camera_id) const
inline

◆ ExistsImage()

◆ ExistsImagePair()

bool colmap::Reconstruction::ExistsImagePair ( const image_pair_t  pair_id) const
inline

Definition at line 529 of file reconstruction.h.

◆ ExistsPoint3D()

bool colmap::Reconstruction::ExistsPoint3D ( const point3D_t  point3D_id) const
inline

◆ ExportBundler()

◆ ExportCam()

◆ ExportNVM()

◆ ExportPLY()

void colmap::Reconstruction::ExportPLY ( const std::string &  path) const

◆ ExportRecon3D()

◆ ExportVRML()

void colmap::Reconstruction::ExportVRML ( const std::string &  images_path,
const std::string &  points3D_path,
const double  image_scale,
const Eigen::Vector3d &  image_rgb 
) const

Definition at line 1244 of file reconstruction.cc.

References QtCompat::endl(), image, and points.

Referenced by colmap::RunModelConverter().

◆ ExtractColorsForAllImages()

void colmap::Reconstruction::ExtractColorsForAllImages ( const std::string &  path)

◆ ExtractColorsForImage()

◆ FilterAllPoints3D()

size_t colmap::Reconstruction::FilterAllPoints3D ( const double  max_reproj_error,
const double  min_tri_angle 
)

◆ FilterImages()

std::vector< image_t > colmap::Reconstruction::FilterImages ( const double  min_focal_length_ratio,
const double  max_focal_length_ratio,
const double  max_extra_param 
)

◆ FilterObservationsWithNegativeDepth()

◆ FilterPoints3D()

size_t colmap::Reconstruction::FilterPoints3D ( const double  max_reproj_error,
const double  min_tri_angle,
const std::unordered_set< point3D_t > &  point3D_ids 
)

◆ FilterPoints3DInImages()

size_t colmap::Reconstruction::FilterPoints3DInImages ( const double  max_reproj_error,
const double  min_tri_angle,
const std::unordered_set< image_t > &  image_ids 
)

◆ FindCommonRegImageIds()

std::vector< image_t > colmap::Reconstruction::FindCommonRegImageIds ( const Reconstruction reconstruction) const

◆ FindImageWithName()

const class Image * colmap::Reconstruction::FindImageWithName ( const std::string &  name) const

◆ GetCorrespondenceGraph()

const CorrespondenceGraph * colmap::Reconstruction::GetCorrespondenceGraph ( ) const
inline

Definition at line 537 of file reconstruction.h.

Referenced by operator=().

◆ HasCorrespondenceGraph()

bool colmap::Reconstruction::HasCorrespondenceGraph ( ) const
inline

Definition at line 541 of file reconstruction.h.

◆ Image() [1/2]

class Image & colmap::Reconstruction::Image ( const image_t  image_id)
inline

Definition at line 477 of file reconstruction.h.

◆ Image() [2/2]

const class Image & colmap::Reconstruction::Image ( const image_t  image_id) const
inline

◆ ImagePair() [1/4]

Reconstruction::ImagePairStat & colmap::Reconstruction::ImagePair ( const image_pair_t  pair_id)
inline

Definition at line 485 of file reconstruction.h.

◆ ImagePair() [2/4]

const Reconstruction::ImagePairStat & colmap::Reconstruction::ImagePair ( const image_pair_t  pair_id) const
inline

Definition at line 462 of file reconstruction.h.

◆ ImagePair() [3/4]

Reconstruction::ImagePairStat & colmap::Reconstruction::ImagePair ( const image_t  image_id1,
const image_t  image_id2 
)
inline

Definition at line 490 of file reconstruction.h.

References colmap::Database::ImagePairToPairId().

◆ ImagePair() [4/4]

const Reconstruction::ImagePairStat & colmap::Reconstruction::ImagePair ( const image_t  image_id1,
const image_t  image_id2 
) const
inline

Definition at line 467 of file reconstruction.h.

References colmap::Database::ImagePairToPairId().

◆ ImagePairs()

const std::unordered_map< image_pair_t, Reconstruction::ImagePairStat > & colmap::Reconstruction::ImagePairs ( ) const
inline

Definition at line 513 of file reconstruction.h.

Referenced by operator=(), and colmap::IncrementalTriangulator::Retriangulate().

◆ Images()

◆ ImportPLY() [1/2]

void colmap::Reconstruction::ImportPLY ( const std::string &  path)

◆ ImportPLY() [2/2]

void colmap::Reconstruction::ImportPLY ( const std::vector< PlyPoint > &  ply_points)

Definition at line 845 of file reconstruction.cc.

References AddPoint3D().

◆ IsImageRegistered()

bool colmap::Reconstruction::IsImageRegistered ( const image_t  image_id) const
inline

◆ Load()

◆ Merge()

◆ MergePoints3D()

◆ Normalize()

void colmap::Reconstruction::Normalize ( const double  extent = 10.0,
const double  p0 = 0.1,
const double  p1 = 0.9,
const bool  use_images = true 
)

◆ NumAddedPoints3D()

size_t colmap::Reconstruction::NumAddedPoints3D ( ) const
inline

Definition at line 448 of file reconstruction.h.

Referenced by operator=().

◆ NumCameras()

size_t colmap::Reconstruction::NumCameras ( ) const
inline

◆ NumImagePairs()

size_t colmap::Reconstruction::NumImagePairs ( ) const
inline

Definition at line 444 of file reconstruction.h.

Referenced by BOOST_AUTO_TEST_CASE().

◆ NumImages()

◆ NumPoints3D()

◆ NumRegImages()

◆ operator=()

Reconstruction & colmap::Reconstruction::operator= ( const Reconstruction other)

◆ Point3D() [1/2]

class Point3D & colmap::Reconstruction::Point3D ( const point3D_t  point3D_id)
inline

Definition at line 481 of file reconstruction.h.

◆ Point3D() [2/2]

◆ Point3DIds()

◆ Points3D()

◆ Read()

◆ ReadBinary()

void colmap::Reconstruction::ReadBinary ( const std::string &  path)

Definition at line 795 of file reconstruction.cc.

References colmap::JoinPaths(), and cloudViewer::t::geometry::path.

Referenced by Read().

◆ ReadText()

void colmap::Reconstruction::ReadText ( const std::string &  path)

Definition at line 789 of file reconstruction.cc.

References colmap::JoinPaths(), and cloudViewer::t::geometry::path.

Referenced by Read().

◆ RegImageIds()

◆ RegisterImage()

void colmap::Reconstruction::RegisterImage ( const image_t  image_id)

◆ SetUp()

void colmap::Reconstruction::SetUp ( const CorrespondenceGraph correspondence_graph)

◆ TearDown()

void colmap::Reconstruction::TearDown ( )

◆ TranscribeImageIdsToDatabase()

void colmap::Reconstruction::TranscribeImageIdsToDatabase ( const Database database)

◆ Transform()

◆ Write()

◆ WriteBinary()

void colmap::Reconstruction::WriteBinary ( const std::string &  path) const

◆ WriteText()

void colmap::Reconstruction::WriteText ( const std::string &  path) const

The documentation for this class was generated from the following files: