MCPcopy Create free account
hub / github.com/davisking/dlib / cv__getitem2__

Function cv__getitem2__

tools/python/src/vector.cpp:107–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105
106
107cv cv__getitem2__(cv& m, py::slice r)
108{
109 size_t start, stop, step, slicelength;
110 if (!r.compute(m.size(), &start, &stop, &step, &slicelength))
111 throw py::error_already_set();
112
113 cv temp(slicelength);
114
115 for (size_t i = 0; i < slicelength; ++i) {
116 temp(i) = m(start); start += step;
117 }
118 return temp;
119}
120
121py::tuple cv_get_matrix_size(cv& m)
122{

Callers

nothing calls this directly

Calls 2

computeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected