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

Function test_dunion

yolo_detector/darknet_opt/src/box.c:136–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134
135
136void test_dunion()
137{
138 box a = {0, 0, 1, 1};
139 box dxa= {0+.0001, 0, 1, 1};
140 box dya= {0, 0+.0001, 1, 1};
141 box dwa= {0, 0, 1+.0001, 1};
142 box dha= {0, 0, 1, 1+.0001};
143
144 box b = {.5, .5, .2, .2};
145 dbox di = dunion(a,b);
146 printf("Union: %f %f %f %f\n", di.dx, di.dy, di.dw, di.dh);
147 float inter = box_union(a, b);
148 float xinter = box_union(dxa, b);
149 float yinter = box_union(dya, b);
150 float winter = box_union(dwa, b);
151 float hinter = box_union(dha, b);
152 xinter = (xinter - inter)/(.0001);
153 yinter = (yinter - inter)/(.0001);
154 winter = (winter - inter)/(.0001);
155 hinter = (hinter - inter)/(.0001);
156 printf("Union Manual %f %f %f %f\n", xinter, yinter, winter, hinter);
157}
158void test_dintersect()
159{
160 box a = {0, 0, 1, 1};

Callers 1

test_boxFunction · 0.85

Calls 2

dunionFunction · 0.85
box_unionFunction · 0.85

Tested by

no test coverage detected