MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / box_intersection

Function box_intersection

yolo_detector/darknet_opt/src/box.c:78–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78float box_intersection(box a, box b)
79{
80 float w = overlap(a.x, a.w, b.x, b.w);
81 float h = overlap(a.y, a.h, b.y, b.h);
82 if(w < 0 || h < 0) return 0;
83 float area = w*h;
84 return area;
85}
86
87float box_union(box a, box b)
88{

Callers 4

box_unionFunction · 0.85
box_iouFunction · 0.85
test_dintersectFunction · 0.85
diouFunction · 0.85

Calls 1

overlapFunction · 0.85

Tested by 1

test_dintersectFunction · 0.68