diff --git a/YOLOPv2.h b/YOLOPv2.h index de3fba4..c7b17ec 100644 --- a/YOLOPv2.h +++ b/YOLOPv2.h @@ -7,6 +7,11 @@ #include #include #include +#include "tcp_utility.hpp" +#include +#include +#include +#include using namespace cv; using namespace Ort; @@ -34,7 +39,9 @@ class YOLOPv2 public: YOLOPv2(Net_config config); Mat detect(Mat& frame); + std::vector mapToByteArray(const std::map& param); private: + tcp::TcpClient tcp_client; int inpWidth; int inpHeight; int nout; @@ -52,7 +59,7 @@ private: const static int N = 6; //采样点数量 const float dis[N] = {1000, 2000, 3000, 4000, 5000, 6000}; //偏移量采样点实际距离(mm) const int ypos[N] = {928, 839, 778, 735, 707, 686}; //偏移量采样点y轴坐标 - const int center = 1048; //车体中心x轴坐标 + const int center = 977;//1048; //车体中心x轴坐标 const float rate[N] = {6.37, 8.26, 10.53, 12.98, 15.87, 19.23}; //图像像素到实际偏移(mm)转换率