Skip to content

Commit b82b852

Browse files
committed
Added load_scm_model to Python bindings
We were able to do that now because io/cvssp.hpp doesn't depend on OpenCV anymore. In principle, this now makes the utils/scm-to-cereal executable obsolete.
1 parent a194097 commit b82b852

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

python/generate-python-bindings.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "eos/morphablemodel/EdgeTopology.hpp"
3333
#include "eos/morphablemodel/MorphableModel.hpp"
3434
#include "eos/morphablemodel/PcaModel.hpp"
35+
#include "eos/morphablemodel/io/cvssp.hpp"
3536
#include "eos/pca/pca.hpp"
3637
#include "eos/render/texture_extraction.hpp"
3738

@@ -213,6 +214,14 @@ PYBIND11_MODULE(eos, eos_module)
213214
morphablemodel_module.def("load_edge_topology", &morphablemodel::load_edge_topology, "Load a 3DMM edge topology file from a json file.", py::arg("filename"));
214215
morphablemodel_module.def("save_edge_topology", &morphablemodel::save_edge_topology, "Save a 3DMM edge topology file to a json file.", py::arg("edge_topology"), py::arg("filename"));
215216

217+
/**
218+
* - load_scm_model()
219+
*/
220+
morphablemodel_module.def("load_scm_model", &morphablemodel::load_scm_model,
221+
"Load a shape and color model from a .scm file containing a Morphable Model in "
222+
"the Surrey CVSSP binary format.",
223+
py::arg("model_filename"), py::arg("isomap_file") = cpp17::nullopt);
224+
216225
/**
217226
* Bindings for the eos::pca namespace:
218227
* - Covariance

0 commit comments

Comments
 (0)