| 58 | } |
| 59 | |
| 60 | static 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 | |
| 76 | static NVCVColorRGBA pytocolor(py::tuple color) |
| 77 | { |
no test coverage detected