#ifndef CR_COMMON_H_
#define CR_COMMON_H_
// Created by wangsheng on 17/5/11.
// Copyright © 2016年 Colorreco. All rights reserved.
//www.colorreco.com
//extend sdk
bool FaceLandTrackM106_ColorReco(unsigned char *gray_image_data,int width,int height,int* facebox ,int MacFaceNum,float *landmarkpos,float *pose);
bool FaceLandInit106_ColorReco();
//顺时针旋转90度
//M N 分别代表宽和高
void Matrix_Rotate_90(uint8_t *src,uint8_t *dst,int M ,int N)
{
for(int i=0;i<M;i++)
for(int j=0;j<N;j++)
{
dst[i*N+j]=src[(N-1-j)*M+i];
}
}
//将坐标系转回去
void UpdatePostionForShow(float *src,int type,int width,int height)
{
float lan[106*2];
for(int i=0;i<106;i++)
{
lan[2*i]=src[2*i+1];
lan[2*i+1]=height-src[2*i];
}
//mem
for(int i=0;i<106;i++)
{
src[2*i]=lan[2*i];
src[2*i+1]=lan[2*i+1];
}
}
float GetFaceBoxFromLandmarkXX106(float *shape, int *facearea)
{
int len = 106;
int topx, topy, botx, boty;
topx = shape[0];
botx = shape[0];
topy = shape[1];
boty = shape[1];
for (int i = 0; i < len; i++)
{
if (shape[2 * i] <= topx)
{
topx = shape[2 * i];
}
if (shape[2 * i] >= botx)
{
botx = shape[2 * i];
}
if (shape[2 * i + 1] <= topy)
{
topy = shape[2 * i + 1];
}
if (shape[2 * i + 1] >= boty)
{
boty = shape[2 * i + 1];
}
}
facearea[0] = topx;
facearea[1] = topy;
facearea[2] = botx-topx;
facearea[3] = facearea[2];
facearea[0] = facearea[0] -facearea[2] *0.05;
facearea[1] = facearea[1] -facearea[3] *0.05;
facearea[2] = facearea[2]*1.1;
facearea[3] = facearea[3]*1.1;
//facearea[3] = boty-topy;
return 0.0f;
}
/// colorreco rectangle definition
typedef struct cr_rect_t {
int left; ///< 矩形最左边的坐标
int top; ///< 矩形最上边的坐标
int right; ///< 矩形最右边的坐标
int bottom; ///< 矩形最下边的坐标
} cr_rect_t;
/// st float type point definition
typedef struct cr_pointf_t {
float x; ///< 点的水平方向坐标,为浮点数
float y; ///< 点的竖直方向坐标,为浮点数
} cr_pointf_t;
/// colorreco integer type point definition
typedef struct cr_pointi_t {
int x; ///< 点的水平方向坐标,为整数
int y; ///< 点的竖直方向坐标,为整数
} cr_pointi_t;
/// @brief 供106点使用
typedef struct cr_mobile_106_t {
cr_rect_t rect; ///< 代表面部的矩形区域
float score; ///< 置信度
cr_pointf_t points_array[106]; ///< 人脸106关键点的数组
int yaw; ///< 水平转角,真实度量的左负右正
int pitch; ///< 俯仰角,真实度量的上负下正
int roll; ///< 旋转角,真实度量的左负右正
int eye_dist; ///< 两眼间距
int ID; ///< faceID
} cr_mobile_106_t,*p_cr_mobile_106_t;
/// @}
#endif // INCLUDE_CR_COMMON_H_
没有合适的资源?快使用搜索试试~ 我知道了~
对标商汤和face++的人脸识别关键点/人脸特征点
共36个文件
m:5个
h:5个
ds_store:4个
3星 · 超过75%的资源 需积分: 50 107 下载量 60 浏览量
2017-12-26
11:11:48
上传
评论 8
收藏 7.09MB ZIP 举报
温馨提示
对标商汤和face++的人脸识别关键点/人脸特征点,无抖动和对环境有很好的鲁棒性。
资源推荐
资源详情
资源评论
收起资源包目录
colorreco_106_track_online.zip (36个子文件)
coloreco_106_track
.DS_Store 6KB
sample_cr_mobile_track_106.xcodeproj
project.xcworkspace
contents.xcworkspacedata 135B
xcuserdata
liuchaoran.xcuserdatad
UserInterfaceState.xcuserstate 11KB
wangsheng.xcuserdatad
UserInterfaceState.xcuserstate 108KB
project.pbxproj 25KB
xcuserdata
liuchaoran.xcuserdatad
xcschemes
xcschememanagement.plist 678B
sample_st_mobile_tra 4KB
wangsheng.xcuserdatad
xcschemes
xcschememanagement.plist 678B
sample_cr_mobile_track_106.xcscheme 4KB
xcdebugger
Breakpoints_v2.xcbkptlist 11KB
sample_cr_mobile_track_106
Assets.xcassets
AppIcon.appiconset
Contents.json 848B
Brand Assets.launchimage
Contents.json 83B
.DS_Store 6KB
main.m 349B
libFaceLandmark106.a 11.3MB
TrackingViewController.m 11KB
AppDelegate.h 296B
AppDelegate.m 2KB
Default-568h@2x.png 54KB
Base.lproj
LaunchScreen.storyboard 2KB
Main.storyboard 6KB
.DS_Store 8KB
CanvasView.h 292B
TrackingViewController.h 244B
ViewController.h 228B
Info.plist 1KB
CanvasView.m 1005B
ViewController.m 1KB
libs
libFaceLandmark106.a 11.59MB
libcurl.a 1.28MB
.CF841BA1-E4F4-487B-8FD7-8A3F869C3518-16015-0000AD453F12CF1E 0B
.DS_Store 6KB
.AC19019B-821F-4AD1-B55E-6D386A5EC233-430-00001DC708C070CA 0B
libface_colorreco.h 3KB
.A417ECD3-D1D5-4A58-86AC-E3C38CFEE651-16015-0000AD4D0076E10B 0B
colorreco_align106-det.bin 1.96MB
共 36 条
- 1
资源评论
- zkwdn2018-04-24非常不错。就是不知道怎么用,怎么编译。。。
- xxixi20092018-01-18下载失败,要先评论才能再次下载
- 二十四桥下一句2019-01-06下载失败,要先评论才能再次下载
- chenwisdom12018-06-06什么玩意啊,好歹解释说明下怎么用啊
- a22682021672018-06-27是MATLAB的程序,不是python
普通网友
- 粉丝: 11
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- mnist手写数据集本地下载链接
- 52193906181644561181711717834527.jpg
- 图片缓冲技术(android)源码
- 花数据集+数据集汇总+标签txt+数据集汇总代码+迁移学习最佳模型+全部迭代最佳模型
- 20240329224412.zip
- switch.docx `switch`语句是C++中的一种流程控制语句,通常用于根据表达式的值选择执行不同的代码块 下面是`
- python绘制直方图-02-进程之间不共享全局变量.ev4.rar
- python绘制直方图-01-第三天知识点回顾.ev4.rar
- 01背包问题动态规划.docx
- 表达式求值.docx表达式求值涉及许多不同的情况和方法,具体取决于表达式的形式和要求的精度 下面是一个简单的例子
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功