| 64 | |
| 65 | template <typename T> |
| 66 | py::tuple py_partition_pixels2 ( |
| 67 | const numpy_image<T>& img, |
| 68 | int num_thresholds |
| 69 | ) |
| 70 | { |
| 71 | DLIB_CASSERT(1 <= num_thresholds && num_thresholds <= 6); |
| 72 | |
| 73 | typename pixel_traits<T>::basic_pixel_type t1,t2,t3,t4,t5,t6; |
| 74 | |
| 75 | switch(num_thresholds) |
| 76 | { |
| 77 | case 1: partition_pixels(img,t1); return py::make_tuple(t1); |
| 78 | case 2: partition_pixels(img,t1,t2); return py::make_tuple(t1,t2); |
| 79 | case 3: partition_pixels(img,t1,t2,t3); return py::make_tuple(t1,t2,t3); |
| 80 | case 4: partition_pixels(img,t1,t2,t3,t4); return py::make_tuple(t1,t2,t3,t4); |
| 81 | case 5: partition_pixels(img,t1,t2,t3,t4,t5); return py::make_tuple(t1,t2,t3,t4,t5); |
| 82 | case 6: partition_pixels(img,t1,t2,t3,t4,t5,t6); return py::make_tuple(t1,t2,t3,t4,t5,t6); |
| 83 | } |
| 84 | DLIB_CASSERT(false, "This should never happen."); |
| 85 | } |
| 86 | |
| 87 | // ---------------------------------------------------------------------------------------- |
| 88 |
nothing calls this directly
no test coverage detected