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

Function matches_rect

dlib/image_processing/remove_unobtainable_rectangles.h:22–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 namespace impl
21 {
22 inline bool matches_rect (
23 const std::vector<rectangle>& rects,
24 const rectangle& rect,
25 const double eps
26 )
27 {
28 for (unsigned long i = 0; i < rects.size(); ++i)
29 {
30 const double score = (rect.intersect(rects[i])).area()/(double)(rect+rects[i]).area();
31 if (score > eps)
32 return true;
33 }
34
35 return false;
36 }
37
38 inline rectangle get_best_matching_rect (
39 const std::vector<rectangle>& rects,

Callers 1

Calls 3

sizeMethod · 0.45
areaMethod · 0.45
intersectMethod · 0.45

Tested by

no test coverage detected