#pragma once #include #include "../vp_node.h" /* * ################################ * why need osd in our pipeline? * ################################ * there are several reasons why we need osd, * 1. we need debug, for the outputs of infer, tracker and ba, displaying is more straightforward than printing. * 2. in some situations like cast screen, it is a functional requirement that we need display what we have done on screen to show what we can do to others who do not know about our product. * * drawing the targets on current frame is the most common operation for osd. */ namespace vp_nodes { // config for vp_osd_node, define how to draw typedef struct vp_osd_node_option { int aaa = 0; } vp_osd_option; // on screen display(short as osd) node. // mainly used to display vp_frame_target on frame. class vp_osd_node: public vp_node { private: // support chinese font cv::Ptr ft2; protected: virtual std::shared_ptr handle_frame_meta(std::shared_ptr meta) override; virtual std::shared_ptr handle_control_meta(std::shared_ptr meta) override; public: vp_osd_node(std::string node_name, std::string font = ""); ~vp_osd_node(); }; }