#ifndef HUMANDETECTION_H
#define HUMANDETECTION_H
#include "VidesData.h"
#include "so_human_sdk.h"
#include "ScopeSemaphoreExit.h"
#include <signal.h>
#include <QDateTime>
#include <opencv2/opencv.hpp>
#include <QDebug>
#include <atomic>
#include<QThread>
class HumanDetection:public QObject {
    Q_OBJECT
public:
    HumanDetection(const QString &modelPaths,
                   float carShapeConfidence);
    ~HumanDetection();

    int findHuManCar(const cv::Mat &source,int res,std::map<int,int>&reMap,
                     std::vector<vides_data::ParkingArea> &currentPlate);
    
    void setHuManParameter(float &height_reference,int &uniformColor);

    void draw_human_on_image(const cv::Mat& image, const TCV_ObjectLocation* boxes, int size);

    qint64 getThreadTime() const;

    bool getIsRunning() const;

    void setIsRunning(bool running);



    
private:
    //高度基准
    float heightReference;
    
    int uniformColor;
    
    TCV_HumanDetector *detector;

    std::atomic<qint64> thread_time;

    std::atomic<bool> isRunning{false};

    
};

#endif // HUMANDETECTION_H
