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

Function padding

examples/caffe_wrapper/mtcnn/caffe_mtcnn_utils.cpp:135–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void padding(int img_h, int img_w, std::vector<face_box>& rects)
136{
137 for(unsigned int i = 0; i < rects.size(); i++)
138 {
139 rects[i].px0 = std::max(rects[i].x0, 1.0f);
140 rects[i].py0 = std::max(rects[i].y0, 1.0f);
141 rects[i].px1 = std::min(rects[i].x1, ( float )img_w);
142 rects[i].py1 = std::min(rects[i].y1, ( float )img_h);
143 }
144}
145
146void process_boxes(std::vector<face_box>& input, int img_h, int img_w, std::vector<face_box>& rects)
147{

Callers 1

process_boxesFunction · 0.70

Calls 3

maxFunction · 0.85
minFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected