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

Function py_remove_incoherent_edge_pixels

tools/python/src/image2.cpp:57–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55// ----------------------------------------------------------------------------------------
56
57std::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

Callers

nothing calls this directly

Calls 5

get_rectFunction · 0.85
num_rowsFunction · 0.50
num_columnsFunction · 0.50
containsMethod · 0.45

Tested by

no test coverage detected