forked from DataXujing/ncnn_android_yolov8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwidget.h
50 lines (39 loc) · 1.04 KB
/
widget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QDebug>
#include <QCamera>
#include <QCameraInfo>
#include <QCameraViewfinder>
#include <QCameraViewfinderSettings>
#include <QCameraImageCapture>
#include <myvideosurface.h>
#include <QImage>
#include <QPainter>
#include <QScreen>
QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent = nullptr);
~Widget();
void NV21_T_RGB(unsigned int width , unsigned int height , unsigned char *yuyv , unsigned char *rgb);
private:
Ui::Widget *ui;
QCamera *camera;
QCameraImageCapture *capture;
QCameraViewfinder *viewfinder;
MyVideoSurface *mySurface;
QImage videoImg;
public slots:
void displayImage(int ,QImage image);
void rcvFrame(QVideoFrame); //接收图像帧数据
void paintEvent(QPaintEvent *event);
private slots:
void on_pushButton_clicked();
void on_label_linkHovered(const QString &link);
};
#endif // MAINWINDOW_H