class QhFaceRect { public: int x; int y; int width; int height; QhFaceRect() { x = 0; y = 0; width = 0; height = 0; } QhFaceRect(int x, int y, int width, int height) { this->x = x; this->y = y; this->width = width; this->height = height; } QhFaceRect(const QhFaceRect &value) { x = value.x; y = value.y; width = value.width; height = value.height; } QhFaceRect& operator=(const QhFaceRect &value) { x = value.x; y = value.y; width = value.width; height = value.height; return *this; } }; class QhFaceInfo { public: int id; float probMale; float probFemale; QhFaceRect rect; std::vector points5; std::vector points_fine; std::vector attrs; std::vector attrs_3D; // pitch, yaw, roll, t3d(x,y), scale std::vector mesh_3D; std::vector motion_pattern; // OpenMouth, OpenCloseEyes, EyebrowRise, HeadUpDown, HeadLeftRight, QhFaceInfo() { id = 0; probMale =0.0; probFemale =0.0; attrs.resize(5, 0); points5.reserve(10); points_fine.reserve(300); attrs_3D.resize(9,-999.0); mesh_3D.resize(MESH_NUM,0); //8250 for 95p motion_pattern.resize(5,-1); }; QhFaceInfo(int pid) { id=pid; probMale =0.0; probFemale =0.0; attrs.resize(5, 0); points5.reserve(10); points_fine.reserve(300); attrs_3D.resize(9,-999.0); mesh_3D.resize(MESH_NUM,0);//8250 for 95p motion_pattern.resize(5,-1); } QhFaceInfo(const QhFaceInfo &value) { id = value.id; probMale =value.probMale; probFemale =value.probFemale; rect = value.rect; points5 = value.points5; points_fine = value.points_fine; attrs = value.attrs; attrs_3D=value.attrs_3D; mesh_3D=value.mesh_3D; motion_pattern= value.motion_pattern; } QhFaceInfo& operator=(const QhFaceInfo &value) { id = value.id; rect = value.rect; points5 = value.points5; points_fine = value.points_fine; attrs = value.attrs; probMale =value.probMale; probFemale =value.probFemale; attrs_3D=value.attrs_3D; mesh_3D=value.mesh_3D; motion_pattern= value.motion_pattern; return *this; } }; /** * 图片检测 * picPathOrData: 图像数据(rgba)或者文件路径 * infos: 返回的猫脸信息 * img_width: 图像宽 * img_height: 图像高 * isData: 标识参数一的类型 */ int faceapi_picture_detect( char *picData, std::vector &infos, int img_width, int img_height);