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

Function box_intersection

tests/bin/test_dk_yolo.cpp:502–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500}
501
502float box_intersection(box a, box b)
503{
504 float w = overlap(a.x, a.w, b.x, b.w);
505 float h = overlap(a.y, a.h, b.y, b.h);
506 if(w < 0 || h < 0)
507 return 0;
508 float area = w * h;
509 return area;
510}
511
512float box_union(box a, box b)
513{

Callers 2

box_unionFunction · 0.70
box_iouFunction · 0.70

Calls 1

overlapFunction · 0.70

Tested by

no test coverage detected