| 195 | } |
| 196 | |
| 197 | void 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 | } |
| 207 | void 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); |
no test coverage detected