MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / pytobox

Function pytobox

python/mod_cvcuda/OsdElement.cpp:60–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60static NVCVBoxI pytobox(py::tuple box)
61{
62 if (box.size() > 4 || box.size() == 0)
63 throw py::value_error("Invalid box size.");
64
65 NVCVBoxI ret;
66 memset(&ret, 0, sizeof(ret));
67
68 int *pr = (int *)&ret;
69 for (size_t i = 0; i < box.size(); ++i)
70 {
71 pr[i] = box[i].cast<int>();
72 }
73 return ret;
74}
75
76static NVCVColorRGBA pytocolor(py::tuple color)
77{

Callers 2

ExportBoxBlurFunction · 0.85
ExportOSDFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected