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

Function dintersect

yolo_detector/darknet_opt/src/box.c:107–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107dbox dintersect(box a, box b)
108{
109 float w = overlap(a.x, a.w, b.x, b.w);
110 float h = overlap(a.y, a.h, b.y, b.h);
111 dbox dover = derivative(a, b);
112 dbox di;
113
114 di.dw = dover.dw*h;
115 di.dx = dover.dx*h;
116 di.dh = dover.dh*w;
117 di.dy = dover.dy*w;
118
119 return di;
120}
121
122dbox dunion(box a, box b)
123{

Callers 3

dunionFunction · 0.85
test_dintersectFunction · 0.85
diouFunction · 0.85

Calls 2

overlapFunction · 0.85
derivativeFunction · 0.85

Tested by 1

test_dintersectFunction · 0.68