guiInfoAdder.hpp 870 字节
Newer Older
G
gineshidalgo99 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#ifndef OPENPOSE__GUI__ADD_GUI_INFO_HPP
#define OPENPOSE__GUI__ADD_GUI_INFO_HPP

#include <queue>
#include <opencv2/core/core.hpp>
#include "../core/array.hpp"

namespace op
{
    class GuiInfoAdder
    {
    public:
        GuiInfoAdder(const cv::Size& outputSize, const int numberGpus);

        void addInfo(cv::Mat& cvOutputData, const Array<float>& pose, const unsigned long long id, const std::string& elementRenderedName);

    private:
        // Const variables
        const cv::Size mOutputSize;
        const int mBorderMargin;
        const int mNumberGpus;
        // Other variables
        std::queue<std::chrono::high_resolution_clock::time_point> mFpsQueue;
        double mFps;
        unsigned int mFpsCounter;
        std::string mLastElementRenderedName;
        int mLastElementRenderedCounter;
    };
}

#endif // OPENPOSE__GUI__ADD_GUI_INFO_HPP