| 55 | // ---------------------------------------------------------------------------------------- |
| 56 | |
| 57 | std::vector<point> py_remove_incoherent_edge_pixels ( |
| 58 | const std::vector<point>& line, |
| 59 | const numpy_image<float>& horz_gradient, |
| 60 | const numpy_image<float>& vert_gradient, |
| 61 | double angle_threshold |
| 62 | ) |
| 63 | { |
| 64 | |
| 65 | DLIB_CASSERT(num_rows(horz_gradient) == num_rows(vert_gradient)); |
| 66 | DLIB_CASSERT(num_columns(horz_gradient) == num_columns(vert_gradient)); |
| 67 | DLIB_CASSERT(angle_threshold >= 0); |
| 68 | for (const auto& p : line) |
| 69 | DLIB_CASSERT(get_rect(horz_gradient).contains(p), "All line points must be inside the given images."); |
| 70 | |
| 71 | return remove_incoherent_edge_pixels(line, horz_gradient, vert_gradient, angle_threshold); |
| 72 | } |
| 73 | |
| 74 | // ---------------------------------------------------------------------------------------- |
| 75 |
nothing calls this directly
no test coverage detected