MCPcopy Create free account
hub / github.com/OAID/Tengine / overlap

Function overlap

tests/bin/test_dk_yolo.cpp:491–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489}
490
491float overlap(float x1, float w1, float x2, float w2)
492{
493 float l1 = x1 - w1 / 2;
494 float l2 = x2 - w2 / 2;
495 float left = l1 > l2 ? l1 : l2;
496 float r1 = x1 + w1 / 2;
497 float r2 = x2 + w2 / 2;
498 float right = r1 < r2 ? r1 : r2;
499 return right - left;
500}
501
502float box_intersection(box a, box b)
503{

Callers 1

box_intersectionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected