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

Function padding

examples/mtcnn/mtcnn_utils.cpp:197–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197void padding(int img_h, int img_w, std::vector<face_box>& rects)
198{
199 for(unsigned int i = 0; i < rects.size(); i++)
200 {
201 rects[i].px0 = std::max(rects[i].x0, 1.0f);
202 rects[i].py0 = std::max(rects[i].y0, 1.0f);
203 rects[i].px1 = std::min(rects[i].x1, ( float )img_w);
204 rects[i].py1 = std::min(rects[i].y1, ( float )img_h);
205 }
206}
207void process_boxes(std::vector<face_box>& input, int img_h, int img_w, std::vector<face_box>& rects, float nms_r_thresh)
208{
209 nms_boxes(input, nms_r_thresh, NMS_UNION, rects);

Callers 1

process_boxesFunction · 0.70

Calls 3

maxFunction · 0.85
minFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected