//
|
// Created by basic on 19-8-17.
|
//
|
|
#ifndef FACEDETECT_EXTRACT_H
|
#define FACEDETECT_EXTRACT_H
|
|
#include <cstdio>
|
#include <cstring>
|
#include <mutex>
|
#include <queue>
|
#include "THFeature_i.h"
|
#include "common.h"
|
#include <thread>
|
#include <map>
|
|
#include <QObject>
|
|
class faceExtract : public QObject
|
{
|
Q_OBJECT
|
|
public:
|
faceExtract(int chan = 1);
|
|
~faceExtract() {
|
printf("~faceTracking()");
|
EF_Release();
|
}
|
|
void run(int chan);
|
|
int getEfSize() {
|
return featureSize;
|
}
|
|
private:
|
int initExtract();
|
|
void THFT2THFI_V1(THFT_FaceInfo* thft, THFI_FacePos* thfi)
|
{
|
if (thft == NULL || thfi == NULL) return;
|
memcpy(thfi, thft, sizeof(THFI_FacePos));
|
}
|
|
private:
|
int nChannel = 8;
|
int featureSize = FEATURE_SIZE;
|
float treshCompare = 0.8;
|
|
public:
|
std::string compare(BYTE* feature, float threshold);
|
private:
|
std::map<std::string, BYTE *> vecFeats;
|
|
signals:
|
void signalTips(std::string str);
|
};
|
|
//class faceCompare {
|
//public:
|
// faceCompare();
|
// ~faceCompare();
|
//
|
// int addPerson();
|
// int deletePerson();
|
// void run();
|
//
|
// std::string compare(BYTE* feature, float threshold);
|
//};
|
|
#endif //FACEDETECT_EXTRACT_H
|