From bf914054daa873ca4837f5008497531e84a9f01c Mon Sep 17 00:00:00 2001 From: TY <1431301249@qq.com> Date: Wed, 25 Jun 2025 13:19:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20YOLOPv2.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YOLOPv2.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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)转换率