ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
multi_views_stereo.cpp
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 
9 
10 #include "pipelines/mvs.h"
11 #include "pybind/docstring.h"
13 
14 namespace cloudViewer {
15 namespace reconstruction {
16 namespace mvs {
17 
18 // Reconstruction multiple views stereo functions have similar arguments,
19 // sharing arg docstrings
20 static const std::unordered_map<std::string, std::string>
22  {"input_path",
23  "Path to either the dense workspace folder or the sparse "
24  "reconstruction."},
25  {"output_path",
26  "The output path containing target cameras.bin/txt, "
27  "images.bin/txt and points3D.bin/txt."},
28  {"input_type",
29  "Supported input type values are {dense, sparse}."},
30  {"stereo_input_type",
31  "Supported stereo input type values are {photometric, "
32  "geometric}."},
33  {"output_type",
34  "Supported output type values are {BIN, TXT, PLY}."},
35  {"workspace_path",
36  "Path to the folder containing the undistorted images."},
37  {"workspace_format",
38  "Supported workspace format values are {COLMAP, PMVS}."},
39  {"pmvs_option_name", "The pmvs option name."},
40  {"config_path", "The config path."},
41  {"bbox_path", "The bounds file path."}};
42 
43 void pybind_multi_views_stereo_methods(py::module &m) {
44  m.def("mesh_delaunay", &MeshDelaunay,
45  py::call_guard<py::gil_scoped_release>(),
46  "Function for the delaunay of mesh", "input_path"_a, "output_path"_a,
47  "input_type"_a = "dense",
48  "delaunay_meshing_options"_a = colmap::mvs::DelaunayMeshingOptions());
49  docstring::FunctionDocInject(m, "mesh_delaunay",
51 
52  m.def("stereo_patch_match", &StereoPatchMatch,
53  py::call_guard<py::gil_scoped_release>(),
54  "Function for the stereo path-match of mesh", "workspace_path"_a,
55  "config_path"_a = "", "workspace_format"_a = "COLMAP",
56  "pmvs_option_name"_a = "option-all",
57  "patch_match_options"_a = colmap::mvs::PatchMatchOptions());
58  docstring::FunctionDocInject(m, "stereo_patch_match",
60 
61  m.def("poisson_mesh", &MeshPoisson,
62  py::call_guard<py::gil_scoped_release>(),
63  "Function for the poisson of mesh", "input_path"_a, "output_path"_a,
64  "poisson_meshing_options"_a = colmap::mvs::PoissonMeshingOptions());
65  docstring::FunctionDocInject(m, "poisson_mesh",
67 
68  m.def("stereo_fuse", &StereoFuse, py::call_guard<py::gil_scoped_release>(),
69  "Function for the stereo path-match of mesh", "workspace_path"_a,
70  "output_path"_a, "bbox_path"_a = "",
71  "stereo_input_type"_a = "geometric", "output_type"_a = "PLY",
72  "workspace_format"_a = "COLMAP", "pmvs_option_name"_a = "option-all",
73  "stereo_fusion_options"_a = colmap::mvs::StereoFusionOptions());
74  docstring::FunctionDocInject(m, "stereo_fuse",
76 }
77 
78 void pybind_multi_views_stereo(py::module &m) {
79  py::module m_submodule =
80  m.def_submodule("mvs", "Reconstruction multiple views stereo.");
82 }
83 
84 } // namespace mvs
85 } // namespace reconstruction
86 } // namespace cloudViewer
void FunctionDocInject(py::module &pybind_module, const std::string &function_name, const std::unordered_map< std::string, std::string > &map_parameter_body_docs)
Definition: docstring.cpp:76
static const std::unordered_map< std::string, std::string > map_shared_argument_docstrings
void pybind_multi_views_stereo_methods(py::module &m)
void pybind_multi_views_stereo(py::module &m)
Generic file read and write utility for python interface.