MCPcopy Create free account
hub / github.com/colmap/colmap / BindSceneRig

Function BindSceneRig

src/pycolmap/scene/rig.cc:16–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14using namespace pybind11::literals;
15
16void BindSceneRig(py::module& m) {
17 py::classh_ext<RigConfig::RigCamera> PyRigConfigCamera(m, "RigConfigCamera");
18 PyRigConfigCamera.def(py::init<>())
19 .def_readwrite("ref_sensor", &RigConfig::RigCamera::ref_sensor)
20 .def_readwrite("image_prefix", &RigConfig::RigCamera::image_prefix)
21 .def_readwrite("cam_from_rig", &RigConfig::RigCamera::cam_from_rig)
22 .def_readwrite("camera", &RigConfig::RigCamera::camera);
23 MakeDataclass(PyRigConfigCamera);
24
25 py::classh_ext<RigConfig> PyRigConfig(m, "RigConfig");
26 PyRigConfig.def(py::init<>()).def_readwrite("cameras", &RigConfig::cameras);
27 MakeDataclass(PyRigConfig);
28
29 m.def("read_rig_config",
30 &ReadRigConfig,
31 "path"_a,
32 "Read the rig configuration from a .json file.");
33 m.def("apply_rig_config",
34 &ApplyRigConfig,
35 "configs"_a,
36 "database"_a,
37 "reconstruction"_a = py::none(),
38 "Applies the given rig configuration to the database and optionally "
39 "derives camera rig extrinsics and intrinsics from the reconstruction, "
40 "if not defined in the config. If the reconstruction is provided, it "
41 "is also updated with the provided config and any previous rigs/frames "
42 "are cleared and overwritten.");
43}

Callers 1

BindSceneFunction · 0.85

Calls 1

MakeDataclassFunction · 0.85

Tested by

no test coverage detected