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

Function box_percent_covered

dlib/image_processing/box_overlap_testing.h:39–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37// ----------------------------------------------------------------------------------------
38
39 inline double box_percent_covered (
40 const drectangle& a,
41 const drectangle& b
42 )
43 {
44 const double inner = a.intersect(b).area();
45 if (inner == 0)
46 return 0;
47 return std::max(inner/a.area(), inner/b.area());
48 }
49
50// ----------------------------------------------------------------------------------------
51

Callers 1

Calls 4

maxFunction · 0.50
drectangleClass · 0.50
areaMethod · 0.45
intersectMethod · 0.45

Tested by

no test coverage detected