Demo entry 6630234



Submitted by anonymous on Jul 08, 2017 at 05:41
Language: C++. Code size: 1.7 kB.


#include "st_error.h"
#include "st_defines.h"
#include "st_type.h"

#ifdef __cplusplus
extern "C" {

//@brife 声明trankID 句柄
typedef struct FaceTrackContext *ST_TrackIDHandle_t;

//@brife 匹配人脸Track结果
typedef struct _TrackResult_t {
    int     idOfFacesInImage; // 当前图像ID
    int     idOfTracked; //匹配到的ID, 如果没有匹配到,返回结果为-1
} ST_TrackResult_t;

//@brife 创建TrackID 句柄
//@param hadle 输出创建成功的TrackID 句柄
//@param modelPath 输入TrackID模型路径
ST_ErrorCode_t ST_SoC_Face_TrackID_Init(
        ST_TrackIDHandle_t              *handle,
        const char                      **modelPath);

//@brife 获取历史中人脸生命周期
ST_ErrorCode_t ST_SoC_Face_SetTrackIDLifeCycle(
        const ST_TrackIDHandle_t        *handle,
        float                           *lifeCycle);

//@brife 设置历史中人脸生命周期
ST_ErrorCode_t ST_SoC_Face_SetTrackIDLifeCycle(
        const ST_TrackIDHandle_t        *handle,
        const float                     lifeCycle);

//@brife 在历史检测结果中,匹配当前图像中检测到的人脸
//@param handle 输入TrackID 句柄
//@param num    当前检测到的人脸数量
//@param cropedImage 当前图像中检测到croped之后的人脸
//@param result 匹配当前图像中人脸在历史中的结果; 
ST_ErrorCode_t ST_SoC_Face_TrackID_Work(
        const ST_TrackIDHandle_t        *handel,
        const int                       num,
        const ST_CropedFaceImage_t      *cropedImage,
        ST_TrackResult_t                *result);

//@brife 销毁TrackID句柄,释放内存
ST_ErrorCode_t ST_SoC_Face_TrackID_Destroy(
        ST_TrackIDHandle_t              *handel);

#ifdef __cplusplus
extern "C" {

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).