#pragma once #include #include #include #include #include #include #include "cnstream_frame.hpp" #include "cnstream_module.hpp" #include "easyinfer/model_loader.h" #include "easytrack/easy_track.h" #include "cnstream_frame_va.hpp" #include "trajectory.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/dnn.hpp" #include "opencv2/opencv.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgcodecs/imgcodecs.hpp" namespace cnstream{ // Pointer for frame info using CNFrameInfoPtr = std::shared_ptr; /// Pointer for infer object using CNInferObjectPtr = std::shared_ptr; class locus : public cnstream::Module, public cnstream::ModuleCreator { using super = cnstream::Module; public: explicit locus(const std::string &name) : super(name) {} bool Open(cnstream::ModuleParamSet paramSet) override { // Your codes. return true; } void Close() override { std::cout << this->GetName() << " Close called" << std::endl; } int Process(std::shared_ptr data) override; std::pair GetBboxCorner(const cnstream::CNInferObject &object, int img_width, int img_height) const; private: locus(const locus &) = delete; locus &operator=(locus const &) = delete; Trajectory m_Trajectory; }; };