#ifndef FACERECONITIONHANDLE_H
#define FACERECONITIONHANDLE_H
#include "BaseAlgorithm.h"
#include "hyperface.h"

#include "herror.h"
#include "LogHandle.h"
#include "VidesData.h"
#include "ScopeSemaphoreExit.h"
#include <opencv2/opencv.hpp>
#include<QCoreApplication>


class FaceReconitionHandle  : public BaseAlgorithm {

private:
    HContextHandle ctxHandle=nullptr;

    float configConfidence;

    std::vector<int32_t>customIds;

    std::atomic<bool>isImageChanged{false};
public:
    FaceReconitionHandle();
    ~FaceReconitionHandle();

    cv::Mat loadImage(const QString &path);
    cv::Mat loadImageFromByteStream(const QString& filePath);

    bool getImageChanged()const;

    void setImageChanged(bool imageChanged);


    void doesItExistEmployee(const QString &sn,const cv::Mat &source,std::list<vides_data::faceRecognitionResult>&face);

    void initSourceImageMap(std::map<QString,QString>&maps,int numberFaces,float confidence);

    void featureRemove();

};
#endif // FACERECONITIONHANDLE_H
