MCPcopy Create free account
hub / github.com/CMU-Perceptual-Computing-Lab/openpose / init_int

Function init_int

python/openpose/openpose_python.cpp:45–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 }
44
45 void init_int(py::dict d)
46 {
47 try
48 {
49 std::vector<std::string> argv;
50 argv.emplace_back("openpose.py");
51 for (auto item : d){
52 // Sanity check
53 std::size_t found = std::string(py::str(item.first)).find("=");
54 if (found != std::string::npos)
55 error("PyOpenPose does not support equal sign flags (e.g., "
56 + std::string(py::str(item.first)) + ").", __LINE__, __FUNCTION__, __FILE__);
57 // Add argument
58 argv.emplace_back("--" + std::string(py::str(item.first)) + "=" + std::string(py::str(item.second)));
59 }
60 parse_gflags(argv);
61 }
62 catch (const std::exception& e)
63 {
64 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
65 }
66 }
67
68 void init_argv(std::vector<std::string> argv)
69 {

Callers 1

configureMethod · 0.85

Calls 3

parse_gflagsFunction · 0.85
whatMethod · 0.80
errorFunction · 0.50

Tested by

no test coverage detected