加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ParkDetProc.h 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
拎壶葱 提交于 2023-11-06 11:10 . 11_06_ky_parkDet
#ifndef PARKDET_PROCESS__H
#define PARKDET_PROCESS__H
#include <cstdio>
#include <string>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <sstream>
#include <ctime>
#include <iterator>
#include <memory>
#include <sstream>
#include <vector>
#include <openvino/openvino.hpp>
#include <opencv2/dnn.hpp>
#include "opencv2/opencv.hpp"
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp"
#include <unistd.h>
#include <sys/time.h>
#include <pthread.h>
#include "spdlog/spdlog.h"
#include "spdlog/sinks/basic_file_sink.h"
#include "yolo.h"
#include "carInParkProc.h"
class ParkDetProc {
public:
ParkDetProc();
virtual ~ParkDetProc();
void InitParkidStr(void);
int GetParkid(int id);
void checkStatus(void);
int YoloParkDetFront(cv::Mat &img, int &number);
int YoloParkDetBack(cv::Mat &img, int &number);
void lock(void);
bool trylock(void);
void unlock(void);
int status;//0: no use, 1: in use, 2:standby
volatile int adjestStatus;//-1: ignore, 0~2 status
char roadName[64];
char startParkid[32];
char endParkid[32];
char weightPathFront[256];
char weightPathBack[256];
char classesidTxtPath[256];
float fXInMapStart;
float fYInMapStart;
float fXInMapEnd;
float fYInMapEnd;
Yolo *pYoloFront;
Yolo *pYoloBack;
std::vector<int> parkClasses;
pthread_mutex_t mutex;
private:
int YoloParkDet(cv::Mat &img, int &number, Yolo *yolo);
};
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化