代码拉取完成,页面将自动刷新
# ifndef UTILS
# define UTILS
#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
#include "opencv2/opencv.hpp"
namespace FaceFusionUtils {
typedef struct
{
float xmin;
float ymin;
float xmax;
float ymax;
} Bbox;
typedef struct
{
float x;
float y;
} KeyPoint;
typedef struct
{
float xmin;
float ymin;
float xmax;
float ymax;
float score;
KeyPoint kp5[5];
} BboxWithKP5;
float GetIoU(const Bbox box1, const Bbox box2);
std::vector<int> nms(std::vector<Bbox> boxes, std::vector<float> confidences, const float nms_thresh);
cv::Mat warp_face_by_face_landmark_5(const cv::Mat temp_vision_frame, cv::Mat &crop_img, const std::vector<cv::Point2f> face_landmark_5, const std::vector<cv::Point2f> normed_template, const cv::Size crop_size);
cv::Mat create_static_box_mask(const int *crop_size, const float face_mask_blur, const int *face_mask_padding);
cv::Mat paste_back(cv::Mat temp_vision_frame, cv::Mat crop_vision_frame, cv::Mat crop_mask, cv::Mat affine_matrix);
cv::Mat blend_frame(cv::Mat temp_vision_frame, cv::Mat paste_vision_frame, const int FACE_ENHANCER_BLEND=80);
float dot_product(const std::vector<float>& vec1, const std::vector<float>& vec2);
}
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。