| 14 | using namespace pybind11::literals; |
| 15 | |
| 16 | void 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 | } |
no test coverage detected