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

Function pytopoint

python/mod_cvcuda/OsdElement.cpp:44–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42namespace {
43
44static NVCVPointI pytopoint(py::tuple point)
45{
46 if (point.size() > 2 || point.size() == 0)
47 throw py::value_error("Invalid point size.");
48
49 NVCVPointI ret;
50 memset(&ret, 0, sizeof(ret));
51
52 int *pr = (int *)&ret;
53 for (size_t i = 0; i < point.size(); ++i)
54 {
55 pr[i] = point[i].cast<int>();
56 }
57 return ret;
58}
59
60static NVCVBoxI pytobox(py::tuple box)
61{

Callers 1

ExportOSDFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected