From 3eb4b20a62a55f66c9363adf98998c4775b4327d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=A4=E7=9F=A5=E6=99=BA=E8=83=BD?= <2386089024@qq.com> Date: Mon, 17 Mar 2025 19:32:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20main.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.h | 95 ---------------------------------------------------------- 1 file changed, 95 deletions(-) delete mode 100644 main.h diff --git a/main.h b/main.h deleted file mode 100644 index dd91d70..0000000 --- a/main.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef _ATK_YOLOV5_OBJECT_RECOGNIZE_H -#define _ATK_YOLOV5_OBJECT_RECOGNIZE_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define _BASETSD_H - -#include "im2d.h" -#include "rga.h" -#include "drm_func.h" -#include "rga_func.h" -#include "rknn_api.h" -#include "rkmedia_api.h" -#include "rkmedia_venc.h" -#include "sample_common.h" -#include "opencv2/opencv.hpp" - -#include "librtsp/rtsp_demo.h" -#include "rk_aiq_user_api_sysctl.h" -#include "rk_aiq_user_api_afec.h" -// #include "rk_aiq_uapi_afec_int.h" - -#include -#include -#include "opencv2/imgcodecs.hpp" - -using namespace cv; - - - -RK_U32 video_width = 1920; -RK_U32 video_height = 1072; -// RK_U32 video_height = 720; -int disp_width = 720; -int disp_height = 1280; - -static bool quit = false; -rtsp_demo_handle g_rtsplive = NULL; -static rtsp_session_handle g_rtsp_session; - -int rgb24_resize(unsigned char *input_rgb, unsigned char *output_rgb, int width,int height, int outwidth, int outheight); - -static unsigned char *load_model(const char *filename, int *model_size); - -static void printRKNNTensor(rknn_tensor_attr *attr); - -void *rkmedia_rknn_thread(void *args); -void *venc_rtsp_tidp(void *args); -void *upload_message(void *args); //上传检测信息与截取的图片 -void *upload_message_controller(void *args); -void *heart_beat(void *args); //上传心跳检测 -void *distortion(void *args); //矫正 -void *read_serial_thread(void *args); //读取串口传来的红外温度数据 - -struct Alarm { - int ifalarm; - int ifwarn; - std::string alarmMsg; - std::string alarmType; - std::string alarmBase64; - std::string alarmCoverage; - float alarmprop; -}; - -void initializeAlarm(Alarm* Alarm) { - // 初始化结构体成员 - Alarm->ifalarm = 0; - Alarm->ifwarn = 0; - Alarm->alarmMsg = "无"; - Alarm->alarmType = "无"; - Alarm->alarmBase64 = "无"; - Alarm->alarmCoverage = "无"; - Alarm->alarmprop = 0.0; -} - -void NV12ToRGB(int width, int height, unsigned char* nv12, Mat& rgb) { - // Step 1: Create a cv::Mat object for NV12 data - Mat nv12Mat(height + height / 2, width, CV_8UC1, nv12); - - // Step 2: Convert NV12 to RGB - cvtColor(nv12Mat, rgb, COLOR_YUV2RGB_NV12); -} - -#endif \ No newline at end of file