2018-05-28 00:21:30 +08:00
|
|
|
#include "mainwindow.h"
|
|
|
|
#include "ui_mainwindow.h"
|
2018-05-28 14:21:19 +08:00
|
|
|
#include <opencv.hpp>
|
2018-05-28 20:34:01 +08:00
|
|
|
#include <highgui.hpp>
|
2018-06-06 20:29:54 +08:00
|
|
|
#include <qqtgiflabel.h>
|
2018-05-28 00:21:30 +08:00
|
|
|
|
2018-05-28 14:21:19 +08:00
|
|
|
MainWindow::MainWindow ( QWidget* parent ) :
|
|
|
|
QMainWindow ( parent ),
|
|
|
|
ui ( new Ui::MainWindow )
|
2018-05-28 00:21:30 +08:00
|
|
|
{
|
2018-05-28 14:21:19 +08:00
|
|
|
ui->setupUi ( this );
|
2018-05-28 20:34:01 +08:00
|
|
|
|
|
|
|
// read an image
|
|
|
|
cv::Mat image = cv::imread ( "./tt.png", 1 );
|
|
|
|
// create image window named "My Image"
|
2018-05-30 15:17:36 +08:00
|
|
|
cv::namedWindow ( "OpenCV Image" );
|
2018-05-28 20:34:01 +08:00
|
|
|
// show the image on window
|
2018-05-30 15:17:36 +08:00
|
|
|
cv::imshow ( "OpenCV Image", image );
|
2018-06-06 20:29:54 +08:00
|
|
|
|
|
|
|
QQtGifLabel* label = new QQtGifLabel ( this );
|
2018-05-28 00:21:30 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
MainWindow::~MainWindow()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|