ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
consistency_graph.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <Eigen/Core>
11 #include <string>
12 #include <vector>
13 
14 #include "util/types.h"
15 
16 namespace colmap {
17 namespace mvs {
18 
19 // List of geometrically consistent images, in the following format:
20 //
21 // r_1, c_1, N_1, i_11, i_12, ..., i_1N_1,
22 // r_2, c_2, N_2, i_21, i_22, ..., i_2N_2, ...
23 //
24 // where r, c are the row and column image coordinates of the pixel,
25 // N is the number of consistent images, followed by the N image indices.
26 // Note that only pixels are listed which are not filtered and that the
27 // consistency graph is only filled if filtering is enabled.
29 public:
31  ConsistencyGraph(const size_t width,
32  const size_t height,
33  const std::vector<int>& data);
34 
35  size_t GetNumBytes() const;
36 
37  void GetImageIdxs(const int row,
38  const int col,
39  int* num_images,
40  const int** image_idxs) const;
41 
42  void Read(const std::string& path);
43  void Write(const std::string& path) const;
44 
45 private:
46  void InitializeMap(const size_t width, const size_t height);
47 
48  const static int kNoConsistentImageIds;
49  std::vector<int> data_;
50  Eigen::MatrixXi map_;
51 };
52 
53 } // namespace mvs
54 } // namespace colmap
M_PI
constexpr double M_PI
Pi.
Definition: CVConst.h:19
types.h
colmap::FeatureKeypoint
Definition: types.h:17
BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(TestFeatureKeypoints)
Definition: types_test.cc:42
cloudViewer::core::make_pair
CLOUDVIEWER_HOST_DEVICE Pair< First, Second > make_pair(const First &_first, const Second &_second)
Definition: SlabTraits.h:49
x
normal_z x
Definition: my_point_types.h:165
colmap::FeatureKeypoint::ComputeScale
float ComputeScale() const
Definition: types.cc:84
data
GraphType data
Definition: graph_cut.cc:138
colmap::FeatureKeypoint::x
float x
Definition: types.h:51
colmap::FeatureKeypoint::a12
float a12
Definition: types.h:56
colmap::mvs::ConsistencyGraph::GetNumBytes
size_t GetNumBytes() const
Definition: consistency_graph.cc:53
colmap::mvs::ConsistencyGraph::ConsistencyGraph
ConsistencyGraph()
Definition: consistency_graph.cc:45
colmap::FeatureKeypoint::a21
float a21
Definition: types.h:57
colmap::mvs::ConsistencyGraph::GetImageIdxs
void GetImageIdxs(const int row, const int col, int *num_images, const int **image_idxs) const
Definition: consistency_graph.cc:57
colmap::FeatureKeypoint::a11
float a11
Definition: types.h:55
colmap::FeatureKeypoint::Rescale
void Rescale(const float scale)
Definition: types.cc:71
testing.h
descriptors
CorePointDescSet * descriptors
Definition: qCanupoTools.cpp:39
width
int width
Definition: FileIOFactory.cpp:142
height
int height
Definition: FileIOFactory.cpp:143
math.h
y
normal_z y
Definition: my_point_types.h:168
colmap::FeatureMatch
Definition: types.h:64
cloudViewer::t::geometry::path
static const std::string path
Definition: PointCloud.cpp:59
colmap::FeatureDescriptors
Eigen::Matrix< uint8_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > FeatureDescriptors
Definition: types.h:79
e
const double * e
Definition: essential_matrix_poly.h:10
misc.h
colmap::FeatureKeypoint::ComputeScaleX
float ComputeScaleX() const
Definition: types.cc:88
colmap::FeatureKeypoint::y
float y
Definition: types.h:52
colmap::mvs::ConsistencyGraph::Read
void Read(const std::string &path)
Definition: consistency_graph.cc:70
colmap::FeatureKeypoint::a22
float a22
Definition: types.h:58
colmap::FeatureMatch::point2D_idx1
point2D_t point2D_idx1
Definition: types.h:71
colmap::FeatureKeypoint::ComputeShear
float ComputeShear() const
Definition: types.cc:100
colmap::mvs::ConsistencyGraph::Write
void Write(const std::string &path) const
Definition: consistency_graph.cc:103
colmap::FeatureMatch::point2D_idx2
point2D_t point2D_idx2
Definition: types.h:74
logging.h
colmap::mvs::ConsistencyGraph
Definition: consistency_graph.h:28
consistency_graph.h
colmap
Definition: AutomaticReconstructionController.h:17
colmap::FeatureKeypoints
std::vector< FeatureKeypoint > FeatureKeypoints
Definition: types.h:77
colmap::FeatureKeypoint::FromParameters
static FeatureKeypoint FromParameters(const float x, const float y, const float scale_x, const float scale_y, const float orientation, const float shear)
Definition: types.cc:60
colmap::FeatureKeypoint::ComputeScaleY
float ComputeScaleY() const
Definition: types.cc:92
colmap::kInvalidPoint2DIdx
const point2D_t kInvalidPoint2DIdx
Definition: types.h:79
colmap::FeatureKeypoint::ComputeOrientation
float ComputeOrientation() const
Definition: types.cc:96
colmap::FeatureMatches
std::vector< FeatureMatch > FeatureMatches
Definition: types.h:80
types.h