个人记录
yolov5Detection.h
#pragma once
#pragma execution_character_set("utf-8")
#include <QtWidgets/QMainWindow>
#include <opencv2/opencv.hpp>
#include "ui_Yolov5Detection.h"
#include <QLabel>
class Yolov5Detection : public QMainWindow
{
Q_OBJECT
public:
Yolov5Detection(QWidget *parent = Q_NULLPTR);
// ~Yolov5Detection();
void ShowImage(QImage& src);
QImage MatToImage(cv::Mat& image);
void YoloDetect(cv::Mat& image);
private:
Ui::Yolov5DetectionClass ui;
cv::Mat img;
cv::Mat c_img;
cv::Mat* temp_img;
QImage src;
QLabel* label;
int click_num=0;
int close_num = 0;
// cv::VideoCapture* capture;
private slots:
void on_OpenImagePushButton_clicked