DFace C++ SDK  3.3.0
dface::DfaceEngine类 参考abstract

DFace人脸引擎API抽象层(DFaceEngine) 更多...

#include <dface_engine.h>

Public 成员函数

 DfaceEngine ()
 
virtual ~DfaceEngine ()
 
virtual bool start ()=0
 
virtual bool stop ()=0
 
virtual bool update (unsigned char *colorFrame, int w, int h, int format, std::vector< dface::Fusion > &fusions, int rotation=0)=0
 
virtual bool update (unsigned char *frame, unsigned char *ir_frame, int w, int h, int format, std::vector< dface::Fusion > &fusions, int rotation=0)=0
 
virtual void appendFeatureWithId (std::vector< unsigned char > appedFeature, int64_t id)=0
 
virtual void appendFeatureWithIdBatch (std::vector< std::vector< unsigned char > > appedFeatures, std::vector< int64_t > ids)=0
 
virtual void removeFeatureId (int64_t id)=0
 
virtual void clear ()=0
 
virtual void setPoseFilter (bool setter)=0
 
virtual void setRGBLiveFilter (bool setter)=0
 
virtual void setQualityFilter (bool setter)=0
 
virtual void setFeatureReturn (bool setter)=0
 
virtual void setPoseThreshold (double yaw_upper_limit, double pitch_upper_limit, double roll_upper_limit)=0
 
virtual void setQualityThreshold (double quality_lower_limit)=0
 
virtual void setRGBLiveThreshold (double lower_limit)=0
 
virtual void setRGBLiveFilter1Count (int count)=0
 
virtual void setRGBLiveFilter1CrossFrameCount (int count)=0
 
virtual void setRGBLiveFilter2Proportion (float val)=0
 
virtual void setRGBLiveAntiLevel (int level)=0
 
virtual void setRGBFakeTrackBan (bool setter)=0
 
virtual void setRGBFakeTrackBanInitCount (int val)=0
 
virtual void setRGBFakeTrackBanTime (int val)=0
 
virtual void setWorkingMode (int mode)=0
 
virtual void setConfidence (float confidence)=0
 
virtual void setDetectMinSize (int size)=0
 
virtual void setRecognizeMinSize (int size)=0
 
virtual void setNumThread (int count)=0
 
virtual void setIRProbe (bool setter)=0
 
virtual void setIRAntiLevel (float level)=0
 
virtual void setReRecognizeLoopCount (int count)=0
 
virtual int getFeatureInsideCount ()=0
 
virtual int identify () const =0
 

详细描述

DFace人脸引擎API抽象层(DFaceEngine)

构造及析构函数说明

◆ DfaceEngine()

dface::DfaceEngine::DfaceEngine ( )
inline

◆ ~DfaceEngine()

virtual dface::DfaceEngine::~DfaceEngine ( )
inlinevirtual

成员函数说明

◆ appendFeatureWithId()

virtual void dface::DfaceEngine::appendFeatureWithId ( std::vector< unsigned char >  appedFeature,
int64_t  id 
)
pure virtual

添加人脸特征和对应的id

参数
[in]appedFeature 人脸特征
[in]id 人脸特征id

◆ appendFeatureWithIdBatch()

virtual void dface::DfaceEngine::appendFeatureWithIdBatch ( std::vector< std::vector< unsigned char > >  appedFeatures,
std::vector< int64_t >  ids 
)
pure virtual

批量添加人脸特征数组和对应的id数组

参数
[in]appedFeature 人脸特征数组
[in]id 人脸特征id数组

◆ clear()

virtual void dface::DfaceEngine::clear ( )
pure virtual

清空已添加的人脸特征数据和内部缓存

◆ getFeatureInsideCount()

virtual int dface::DfaceEngine::getFeatureInsideCount ( )
pure virtual

获得引擎内置人脸特征数(appendFeatureWithId后的数据)

◆ identify()

virtual int dface::DfaceEngine::identify ( ) const
pure virtual

◆ removeFeatureId()

virtual void dface::DfaceEngine::removeFeatureId ( int64_t  id)
pure virtual

删除对应id的人脸特征数据

参数
[in]id 人脸特征id

◆ setConfidence()

virtual void dface::DfaceEngine::setConfidence ( float  confidence)
pure virtual

识别阈值

参数
[in]confidence 阈值

◆ setDetectMinSize()

virtual void dface::DfaceEngine::setDetectMinSize ( int  size)
pure virtual

检测最小脸尺寸

参数
[in]size 尺寸

◆ setFeatureReturn()

virtual void dface::DfaceEngine::setFeatureReturn ( bool  setter)
pure virtual

是否设置Fusion返回人脸特征字节码(512或者2048字节)

◆ setIRAntiLevel()

virtual void dface::DfaceEngine::setIRAntiLevel ( float  level)
pure virtual

设置红外活体检测安全级别

参数
[in]level级别值
注解
0~1, 值越大级别越高, 默认0.6

◆ setIRProbe()

virtual void dface::DfaceEngine::setIRProbe ( bool  setter)
pure virtual

是否开启红外探测(夜间可开启探测是否有人,智能控制补光灯)

参数
[in]setter设置值

◆ setNumThread()

virtual void dface::DfaceEngine::setNumThread ( int  count)
pure virtual

线程数

参数
[in]count 线程数

◆ setPoseFilter()

virtual void dface::DfaceEngine::setPoseFilter ( bool  setter)
pure virtual

是否开启姿态过滤

◆ setPoseThreshold()

virtual void dface::DfaceEngine::setPoseThreshold ( double  yaw_upper_limit,
double  pitch_upper_limit,
double  roll_upper_limit 
)
pure virtual

姿态过滤角度阈值

参数
[in]yaw_upper_limit yaw角上限值
[in]pitch_upper_limit pitch角上限值
[in]roll_upper_limit roll角上限值

◆ setQualityFilter()

virtual void dface::DfaceEngine::setQualityFilter ( bool  setter)
pure virtual

是否开启清晰度判断过滤

◆ setQualityThreshold()

virtual void dface::DfaceEngine::setQualityThreshold ( double  quality_lower_limit)
pure virtual

人脸清晰度阈值

参数
[in]quality_lower_limit 清晰度下限

◆ setRecognizeMinSize()

virtual void dface::DfaceEngine::setRecognizeMinSize ( int  size)
pure virtual

识别最小脸尺寸

参数
[in]size 尺寸

◆ setReRecognizeLoopCount()

virtual void dface::DfaceEngine::setReRecognizeLoopCount ( int  count)
pure virtual

设置陌生人重新识别间隔帧数

参数
[in]count 间隔帧数

◆ setRGBFakeTrackBan()

virtual void dface::DfaceEngine::setRGBFakeTrackBan ( bool  setter)
pure virtual

是否开启连续非活体次数超标后禁止识别

参数
[in]setter 是否开启

◆ setRGBFakeTrackBanInitCount()

virtual void dface::DfaceEngine::setRGBFakeTrackBanInitCount ( int  val)
pure virtual

连续非活体次数

参数
[in]val 次数值

◆ setRGBFakeTrackBanTime()

virtual void dface::DfaceEngine::setRGBFakeTrackBanTime ( int  val)
pure virtual

连续非活体禁止识别持续时长(帧数)

参数
[in]val 时长值(帧数)

◆ setRGBLiveAntiLevel()

virtual void dface::DfaceEngine::setRGBLiveAntiLevel ( int  level)
pure virtual

RGB单目活体级别, 1:开启Filter1过滤 2:开启Filter2过滤 3:开启Filter1+Filter2过滤

参数
[in]level级别

◆ setRGBLiveFilter()

virtual void dface::DfaceEngine::setRGBLiveFilter ( bool  setter)
pure virtual

是否开启RGB单目活体过滤

◆ setRGBLiveFilter1Count()

virtual void dface::DfaceEngine::setRGBLiveFilter1Count ( int  count)
pure virtual

RGB单目活体过Filter1过滤数量

参数
[in]countPat数量

◆ setRGBLiveFilter1CrossFrameCount()

virtual void dface::DfaceEngine::setRGBLiveFilter1CrossFrameCount ( int  count)
pure virtual

RGB单目活体Filter1过滤滑动平均跨帧数

参数
[in]count跨帧数

◆ setRGBLiveFilter2Proportion()

virtual void dface::DfaceEngine::setRGBLiveFilter2Proportion ( float  val)
pure virtual

RGB单目活体Filter2过滤占比

参数
[in]val比例,默认0.6

◆ setRGBLiveThreshold()

virtual void dface::DfaceEngine::setRGBLiveThreshold ( double  lower_limit)
pure virtual

RGB单目活体过滤阈值

参数
[in]lower_limit分值下限值

◆ setWorkingMode()

virtual void dface::DfaceEngine::setWorkingMode ( int  mode)
pure virtual

设置工作模式

参数
[in]mode 工作模式,代码查看ENGINE_RECOGNIZE_MODE_CODE枚举

◆ start()

virtual bool dface::DfaceEngine::start ( )
pure virtual

启动引擎

注解
()

◆ stop()

virtual bool dface::DfaceEngine::stop ( )
pure virtual

关闭引擎

注解
()

◆ update() [1/2]

virtual bool dface::DfaceEngine::update ( unsigned char *  colorFrame,
int  w,
int  h,
int  format,
std::vector< dface::Fusion > &  fusions,
int  rotation = 0 
)
pure virtual

引擎刷新帧,返回人脸识别引擎分析的数据

参数
[in]colorFrame彩色图像字节数据
[in]w图片宽
[in]h图片高
[in]format图片格式(PIXELS_BGR, PIXELS_RGB, PIXELS_RGBA)
[out]fusions返回人脸识别引擎分析的数据

◆ update() [2/2]

virtual bool dface::DfaceEngine::update ( unsigned char *  frame,
unsigned char *  ir_frame,
int  w,
int  h,
int  format,
std::vector< dface::Fusion > &  fusions,
int  rotation = 0 
)
pure virtual

引擎刷新帧(适合双目活体输入),返回人脸识别引擎分析的数据

参数
[in]colorFrame彩色图像字节数据
[in]w图片宽
[in]h图片高
[in]irFrame 红外图像字节数据
[out]fusions返回人脸识别引擎分析的数据

该类的文档由以下文件生成: