SlideShare a Scribd company logo
1 of 34
Download to read offline
Basic Programming Tutorial
Han Sol Kang
October 5, 2018
2
Contents
Installation
Qt application
Introduction
Example
October 5, 2018
3
Introduction
Haavard Nord(left) and
Eirik Chambe-Eng(right)
Qt (/kjuːt/ "cute") : a cross-platform application framework that is widely used for
developing application software
“Write once, compile anywhere” (WOCA)
“Q”
“t”
Haavard's Emacs typeface
Inspired by Xt (X toolkit)
October 5, 2018
4
Introduction
A modern user interface that is beautiful on every screen and performs
perfectly on every platform is not an option, it’s a necessity.
— 8 of Top 10 Fortune 500 companies use Qt —
October 5, 2018
5
Introduction
If you want to know just what’s possible with Qt, all you have to do is look at
how some of the leading companies in more than 70 industries are powering
millions of devices all over the world including Rimac, Formlabs, AMD,
Ubuntu, Imaginando, Xsens, Dolby Labs, Tableau, Holoplot, Ulstein, NXP, and
many more.
October 5, 2018
6
Introduction
 Supported Platforms (Officially)
Windows
Windows 10 (64-bit) MSVC 2015
Windows 10 (32-bit) MSVC 2015
Windows 8.1 (64-bit) MSVC 2015, MSVC 2013, MinGW 5.3
, MinGW 4.9, MinGW 4.8
Windows 8.1 (32-bit) MSVC 2015, MSVC 2013, MinGW 5.3
, MinGW 4.9, MinGW 4.8
Windows 7 (64-bit) MSVC 2015, MSVC 2013, MinGW 5.3
, MinGW 4.9, MinGW 4.8
Windows 7 (32-bit) MSVC 2015, MSVC 2013, MinGW 5.3
, MinGW 4.9, MinGW 4.8
Mobile Platforms: Android, iOS, WinRT
Windows Phone 8.1 (arm) MSVC 2013
Windows Runtime (x86, x86_64,
arm)
MSVC 2015, MSVC 2013
iOS 6 and above Clang as provided by Apple
Android (API Level: 16) GCC as provided by Google
Linux/X11
openSUSE 13.1 (64-bit) GCC 4.8.1
Red Hat Enterprise Linux 6.6 (64-bit) GCC 4.9.1
Ubuntu 14.04 (64-bit) GCC 4.6.3
(Linux 32/64-bit) GCC 4.8.1, GCC 4.9.1
OS X
OS X 10.8, 10.9, 10.10, 10.11 Clang as provided by Apple
Embedded Platforms: Embedded Linux, QNX
Embedded Linux GCC
QNX 6.6.0 (armv7le and x86) As provided by QNX
7
Installation
October 5, 2018
Browser
https://www.qt.io/
 Download Qt
October 5, 2018
8
Installation
 Set up Qt
October 5, 2018
9
Installation
 Visual studio extension
October 5, 2018
10
Installation
 Visual studio extension
October 5, 2018
11
Installation
 Visual studio extension
October 5, 2018
12
Installation
 Visual studio extension
October 5, 2018
13
Qt application
 Creating a Qt application
October 5, 2018
14
Qt application
 Creating a Qt application
October 5, 2018
15
Qt application
 Creating a Qt application
October 5, 2018
16
Qt application
 Structure of Qt application
October 5, 2018
17
Qt application
 Structure of Qt application
October 5, 2018
18
Qt application
 Concept of signal and slot
SIGNALEvent(Message)
SLOTEvent handler(Function)
ON_BN_CLICKED(id, memberFxn)
connect(sender, signal, receiver, member,
Qt::ConnectionType = Qt::AutoConnection)
October 5, 2018
19
Qt application
 Concept of signal and slot
October 5, 2018
20
Qt application
 Concept of signal and slot
October 5, 2018
21
Qt application
 Concept of signal and slot
October 5, 2018
22
Qt application
 ImageShowUsingQt
October 5, 2018
23
Qt application
 QPushButton & QFileDialog
#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_ImageShowUsingQt.h"
class ImageShowUsingQt : public QMainWindow
{
Q_OBJECT
public:
ImageShowUsingQt(QWidget *parent = Q_NULLPTR);
private:
Ui::ImageShowUsingQtClass ui;
};
#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_ImageShowUsingQt.h"
#include "QFileDialog"
class ImageShowUsingQt : public QMainWindow
{
Q_OBJECT
public:
ImageShowUsingQt(QWidget *parent = Q_NULLPTR);
private:
Ui::ImageShowUsingQtClass ui;
private slots:
void LoadImage();
};
[ImageShowUsingQt.h]
October 5, 2018
24
Qt application
 QPushButton & QFileDialog
[ImageShowUsingQt.cpp]
#include "ImageShowUsingQt.h"
ImageShowUsingQt::ImageShowUsingQt(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
}
void ImageShowUsingQt::LoadImage()
{
ui.listWidget->clear();
HistoryImg.clear();
QString qsfileName = QFileDialog::getOpenFileName(this, tr("Open Image"), "../", tr("Image Files (*.png
*.jpg *.bmp)"));
InputImg = imread(qsfileName.toStdString());
ShowImage(InputImg);
HistoryImg.push_back(InputImg);
ui.listWidget->addItem("Original Image");
}
QString getOpenFileName(QWidget *parent = Q_NULLPTR,
const QString &caption = QString(),
const QString &dir = QString(),
const QString &filter = QString(),
QString *selectedFilter = Q_NULLPTR,
Options options = Options());
October 5, 2018
25
Qt application
 QPushButton & QFileDialog
[QString & std::string]
QString -> std::string
std::string -> QString
QString qstring;
std::string stdstring;
stdstring = qstring.toStdString();
QString qstring;
std::string stdstring;
qstring.fromStdString(stdstring);
October 5, 2018
26
Qt application
 QRadioButton & QLineEdit
void ImageShowUsingQt::Processing()
{
//lineedit
lowthresh = ui.Lowvalue->text().toInt();
highthresh = ui.Highvalue->text().toInt();
//flag
//-1 : default, 0 : sobel, 1 : Canny
int flag = -1;
if (ui.SobelButton->isChecked()) flag = 0;
if (ui.CannyButton->isChecked()) flag = 1;
if (flag == -1)
{
return;
}
else if (flag == 0)
{
cvtColor(InputImg, OutputImg, CV_BGR2GRAY);
Sobel(OutputImg, OutputImg, CV_8UC1, 1, 1, 5);
cvtColor(OutputImg, OutputImg, CV_GRAY2BGR);
if (flag == -1)
{
return;
}
else if (flag == 0)
{
cvtColor(InputImg, OutputImg, CV_BGR2GRAY);
Sobel(OutputImg, OutputImg, CV_8UC1, 1, 1, 5);
cvtColor(OutputImg, OutputImg, CV_GRAY2BGR);
ShowImage(OutputImg);
HistoryImg.push_back(OutputImg);
ui.listWidget->addItem("Sobel");
}
else if (flag = 1)
{
cvtColor(InputImg, OutputImg, CV_BGR2GRAY);
Canny(OutputImg, OutputImg, lowthresh, highthresh);
cvtColor(OutputImg, OutputImg, CV_GRAY2BGR);
ShowImage(OutputImg);
HistoryImg.push_back(OutputImg);
QString th;
th.sprintf("Canny (low : %d, high : %d)", lowthresh, highthresh);
ui.listWidget->addItem(th);
}
}
October 5, 2018
27
Qt application
 QCheckBox & QComboBox
{
Mat temp;
cvtColor(InputImg, temp, CV_BGR2GRAY);
cvtColor(temp, temp, CV_GRAY2BGR);
ShowImage(temp);
}
}
October 5, 2018
28
Qt application
 QCheckBox & QComboBox
void ImageShowUsingQt::Activation()
{
int i = ui.comboBox->currentIndex();
if (i == 0)
{
ui.RedButton->setCheckable(1);
ui.BlueButton->setCheckable(1);
ui.GreenButton->setCheckable(1);
}
else
{
ui.RedButton->setCheckable(0);
ui.BlueButton->setCheckable(0);
ui.GreenButton->setCheckable(0);
}
}
October 5, 2018
29
Qt application
 Dial
October 5, 2018
30
Qt application
 Dial
void ImageShowUsingQt::IntensityControl()
{
Mat temp;
vector<Mat> Channel;
cvtColor(InputImg, temp, CV_BGR2HSV);
split(temp, Channel);
Channel[2]+=ui.dial->value();
merge(Channel, temp);
cvtColor(temp, temp, CV_HSV2BGR);
ShowImage(temp);
}
October 5, 2018
31
Qt application
 QListWidget
void ImageShowUsingQt::ShowHistory()
{
int i = ui.listWidget->currentRow();
ShowImage(HistoryImg[i]);
}
void ImageShowUsingQt::Processing()
{
//lineedit
lowthresh = ui.Lowvalue->text().toInt();
highthresh = ui.Highvalue->text().toInt();
//flag
//-1 : default, 0 : sobel, 1 : Canny
int flag = -1;
if (ui.SobelButton->isChecked()) flag = 0;
if (ui.CannyButton->isChecked()) flag = 1;
if (flag == -1)
{
return;
}
else if (flag == 0)
{
cvtColor(InputImg, OutputImg, CV_BGR2GRAY);
Sobel(OutputImg, OutputImg, CV_8UC1, 1, 1, 5);
cvtColor(OutputImg, OutputImg, CV_GRAY2BGR);
ShowImage(OutputImg);
HistoryImg.push_back(OutputImg);
ui.listWidget->addItem("Sobel");
}
else if (flag = 1)
{
cf. Processing
October 5, 2018
32
Qt application
 QGraphicsView
void ImageShowUsingQt::ShowImage(Mat image)
{
image.copyTo(LastImg);
scene.clear();
QImage qimg(image.data, image.cols, image.rows, QImage::Format_RGB888);
scene.addPixmap(QPixmap::fromImage(qimg.rgbSwapped()));
ui.graphicsView->setScene(&scene);
ui.graphicsView->show();
}
October 5, 2018
33
Qt application
 ImageShowUsingQt - Demo
October 5, 2018
Q & A

More Related Content

What's hot

Qt Multiplatform development
Qt Multiplatform developmentQt Multiplatform development
Qt Multiplatform developmentSergio Shevchenko
 
Putting the Fun into Functioning CI/CD with JHipster
Putting the Fun into Functioning CI/CD with JHipsterPutting the Fun into Functioning CI/CD with JHipster
Putting the Fun into Functioning CI/CD with JHipsterGerard Gigliotti
 
So I Downloaded Qt, Now What?
So I Downloaded Qt, Now What?So I Downloaded Qt, Now What?
So I Downloaded Qt, Now What?Janel Heilbrunn
 
Qt for beginners part 5 ask the experts
Qt for beginners part 5   ask the expertsQt for beginners part 5   ask the experts
Qt for beginners part 5 ask the expertsICS
 
Video Editing: Targeting Professional Post Production Use cases (GStreamer Co...
Video Editing: Targeting Professional Post Production Use cases (GStreamer Co...Video Editing: Targeting Professional Post Production Use cases (GStreamer Co...
Video Editing: Targeting Professional Post Production Use cases (GStreamer Co...Igalia
 
Migrating from Photon to Qt
Migrating from Photon to QtMigrating from Photon to Qt
Migrating from Photon to QtJanel Heilbrunn
 
Efficient Graphics with Qt
Efficient Graphics with QtEfficient Graphics with Qt
Efficient Graphics with QtAriya Hidayat
 
Smashing the bottleneck: Qt application profiling
Smashing the bottleneck: Qt application profilingSmashing the bottleneck: Qt application profiling
Smashing the bottleneck: Qt application profilingDeveler S.r.l.
 
GPGPU Programming @DroidconNL 2012 by Alten
GPGPU Programming @DroidconNL 2012 by AltenGPGPU Programming @DroidconNL 2012 by Alten
GPGPU Programming @DroidconNL 2012 by AltenArjan Somers
 
The Ring programming language version 1.8 book - Part 92 of 202
The Ring programming language version 1.8 book - Part 92 of 202The Ring programming language version 1.8 book - Part 92 of 202
The Ring programming language version 1.8 book - Part 92 of 202Mahmoud Samir Fayed
 
How to Make Your Qt App Look Native
How to Make Your Qt App Look NativeHow to Make Your Qt App Look Native
How to Make Your Qt App Look Nativeaccount inactive
 
Meet Qt Canada
Meet Qt CanadaMeet Qt Canada
Meet Qt CanadaQt
 
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...ICS
 
Software Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business LogicSoftware Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business LogicICS
 
Qt Internationalization
Qt InternationalizationQt Internationalization
Qt InternationalizationICS
 
Meet the Widgets: Another Way to Implement UI
Meet the Widgets: Another Way to Implement UIMeet the Widgets: Another Way to Implement UI
Meet the Widgets: Another Way to Implement UIICS
 

What's hot (20)

Qt Multiplatform development
Qt Multiplatform developmentQt Multiplatform development
Qt Multiplatform development
 
Qt Workshop
Qt WorkshopQt Workshop
Qt Workshop
 
Cross Platform Qt
Cross Platform QtCross Platform Qt
Cross Platform Qt
 
Putting the Fun into Functioning CI/CD with JHipster
Putting the Fun into Functioning CI/CD with JHipsterPutting the Fun into Functioning CI/CD with JHipster
Putting the Fun into Functioning CI/CD with JHipster
 
So I Downloaded Qt, Now What?
So I Downloaded Qt, Now What?So I Downloaded Qt, Now What?
So I Downloaded Qt, Now What?
 
Qt for beginners part 5 ask the experts
Qt for beginners part 5   ask the expertsQt for beginners part 5   ask the experts
Qt for beginners part 5 ask the experts
 
Video Editing: Targeting Professional Post Production Use cases (GStreamer Co...
Video Editing: Targeting Professional Post Production Use cases (GStreamer Co...Video Editing: Targeting Professional Post Production Use cases (GStreamer Co...
Video Editing: Targeting Professional Post Production Use cases (GStreamer Co...
 
Migrating from Photon to Qt
Migrating from Photon to QtMigrating from Photon to Qt
Migrating from Photon to Qt
 
Efficient Graphics with Qt
Efficient Graphics with QtEfficient Graphics with Qt
Efficient Graphics with Qt
 
Smashing the bottleneck: Qt application profiling
Smashing the bottleneck: Qt application profilingSmashing the bottleneck: Qt application profiling
Smashing the bottleneck: Qt application profiling
 
GPGPU Programming @DroidconNL 2012 by Alten
GPGPU Programming @DroidconNL 2012 by AltenGPGPU Programming @DroidconNL 2012 by Alten
GPGPU Programming @DroidconNL 2012 by Alten
 
The Ring programming language version 1.8 book - Part 92 of 202
The Ring programming language version 1.8 book - Part 92 of 202The Ring programming language version 1.8 book - Part 92 of 202
The Ring programming language version 1.8 book - Part 92 of 202
 
Open gl introduction
Open gl introduction Open gl introduction
Open gl introduction
 
How to Make Your Qt App Look Native
How to Make Your Qt App Look NativeHow to Make Your Qt App Look Native
How to Make Your Qt App Look Native
 
Meet Qt Canada
Meet Qt CanadaMeet Qt Canada
Meet Qt Canada
 
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
 
Software Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business LogicSoftware Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business Logic
 
Qt Internationalization
Qt InternationalizationQt Internationalization
Qt Internationalization
 
Opengl basics
Opengl basicsOpengl basics
Opengl basics
 
Meet the Widgets: Another Way to Implement UI
Meet the Widgets: Another Way to Implement UIMeet the Widgets: Another Way to Implement UI
Meet the Widgets: Another Way to Implement UI
 

Similar to QT 프로그래밍 기초(basic of QT programming tutorial)

Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfDeveloping and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfPrabindh Sundareson
 
Porting Qt to a new Smartphone for Fun and Fame
Porting Qt to a new Smartphone for Fun and FamePorting Qt to a new Smartphone for Fun and Fame
Porting Qt to a new Smartphone for Fun and FameJarosław Staniek
 
PyQt Application Development On Maemo
PyQt Application Development On MaemoPyQt Application Development On Maemo
PyQt Application Development On Maemoachipa
 
Qt for Python
Qt for PythonQt for Python
Qt for PythonICS
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarICS
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarJanel Heilbrunn
 
So I downloaded Qt, Now What?
So I downloaded Qt, Now What?So I downloaded Qt, Now What?
So I downloaded Qt, Now What?ICS
 
Qt for beginners part 4 doing more
Qt for beginners part 4   doing moreQt for beginners part 4   doing more
Qt for beginners part 4 doing moreICS
 
Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017Johan Thelin
 
The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202Mahmoud Samir Fayed
 
Performance Verification for ESL Design Methodology from AADL Models
Performance Verification for ESL Design Methodology from AADL ModelsPerformance Verification for ESL Design Methodology from AADL Models
Performance Verification for ESL Design Methodology from AADL ModelsSpace Codesign
 
Les ZAPeroTech #4 : découverte de Flutter
Les ZAPeroTech #4 : découverte de FlutterLes ZAPeroTech #4 : découverte de Flutter
Les ZAPeroTech #4 : découverte de FlutterDocDoku
 
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)Igalia
 

Similar to QT 프로그래밍 기초(basic of QT programming tutorial) (20)

Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfDeveloping and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
 
Qt
QtQt
Qt
 
Porting Qt to a new Smartphone for Fun and Fame
Porting Qt to a new Smartphone for Fun and FamePorting Qt to a new Smartphone for Fun and Fame
Porting Qt to a new Smartphone for Fun and Fame
 
PyQt Application Development On Maemo
PyQt Application Development On MaemoPyQt Application Development On Maemo
PyQt Application Development On Maemo
 
Qt for Python
Qt for PythonQt for Python
Qt for Python
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
 
So I downloaded Qt, Now What?
So I downloaded Qt, Now What?So I downloaded Qt, Now What?
So I downloaded Qt, Now What?
 
Qt for beginners
Qt for beginnersQt for beginners
Qt for beginners
 
Qt for S60
Qt for S60Qt for S60
Qt for S60
 
Treinamento Qt básico - aula I
Treinamento Qt básico - aula ITreinamento Qt básico - aula I
Treinamento Qt básico - aula I
 
Introduction to Qt
Introduction to QtIntroduction to Qt
Introduction to Qt
 
Qt for beginners part 4 doing more
Qt for beginners part 4   doing moreQt for beginners part 4   doing more
Qt for beginners part 4 doing more
 
Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017
 
Qt5 on ti processors
Qt5 on ti processorsQt5 on ti processors
Qt5 on ti processors
 
The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202
 
Performance Verification for ESL Design Methodology from AADL Models
Performance Verification for ESL Design Methodology from AADL ModelsPerformance Verification for ESL Design Methodology from AADL Models
Performance Verification for ESL Design Methodology from AADL Models
 
Les ZAPeroTech #4 : découverte de Flutter
Les ZAPeroTech #4 : découverte de FlutterLes ZAPeroTech #4 : découverte de Flutter
Les ZAPeroTech #4 : découverte de Flutter
 
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
 
caQtDM_Argonne.pptx
caQtDM_Argonne.pptxcaQtDM_Argonne.pptx
caQtDM_Argonne.pptx
 

More from Hansol Kang

ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )
ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )
ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )Hansol Kang
 
관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)
관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)
관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)Hansol Kang
 
알아두면 쓸모있는 깃허브 2
알아두면 쓸모있는 깃허브 2알아두면 쓸모있는 깃허브 2
알아두면 쓸모있는 깃허브 2Hansol Kang
 
알아두면 쓸모있는 깃허브 1
알아두면 쓸모있는 깃허브 1알아두면 쓸모있는 깃허브 1
알아두면 쓸모있는 깃허브 1Hansol Kang
 
basic of deep learning
basic of deep learningbasic of deep learning
basic of deep learningHansol Kang
 
파이썬 제대로 활용하기
파이썬 제대로 활용하기파이썬 제대로 활용하기
파이썬 제대로 활용하기Hansol Kang
 
모던 C++ 정리
모던 C++ 정리모던 C++ 정리
모던 C++ 정리Hansol Kang
 
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...Hansol Kang
 
LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)
LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)
LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)Hansol Kang
 
InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...
InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...
InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...Hansol Kang
 
딥러닝 중급 - AlexNet과 VggNet (Basic of DCNN : AlexNet and VggNet)
딥러닝 중급 - AlexNet과 VggNet (Basic of DCNN : AlexNet and VggNet)딥러닝 중급 - AlexNet과 VggNet (Basic of DCNN : AlexNet and VggNet)
딥러닝 중급 - AlexNet과 VggNet (Basic of DCNN : AlexNet and VggNet)Hansol Kang
 
PyTorch 튜토리얼 (Touch to PyTorch)
PyTorch 튜토리얼 (Touch to PyTorch)PyTorch 튜토리얼 (Touch to PyTorch)
PyTorch 튜토리얼 (Touch to PyTorch)Hansol Kang
 
Deep Convolutional GANs - meaning of latent space
Deep Convolutional GANs - meaning of latent spaceDeep Convolutional GANs - meaning of latent space
Deep Convolutional GANs - meaning of latent spaceHansol Kang
 
쉽게 설명하는 GAN (What is this? Gum? It's GAN.)
쉽게 설명하는 GAN (What is this? Gum? It's GAN.)쉽게 설명하는 GAN (What is this? Gum? It's GAN.)
쉽게 설명하는 GAN (What is this? Gum? It's GAN.)Hansol Kang
 
문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)
문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)
문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)Hansol Kang
 
신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)
신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)
신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)Hansol Kang
 
HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법
HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법
HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법Hansol Kang
 
Continuously Adaptive Mean Shift(CAMSHIFT)
Continuously Adaptive Mean Shift(CAMSHIFT)Continuously Adaptive Mean Shift(CAMSHIFT)
Continuously Adaptive Mean Shift(CAMSHIFT)Hansol Kang
 

More from Hansol Kang (20)

ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )
ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )
ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )
 
관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)
관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)
관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)
 
알아두면 쓸모있는 깃허브 2
알아두면 쓸모있는 깃허브 2알아두면 쓸모있는 깃허브 2
알아두면 쓸모있는 깃허브 2
 
알아두면 쓸모있는 깃허브 1
알아두면 쓸모있는 깃허브 1알아두면 쓸모있는 깃허브 1
알아두면 쓸모있는 깃허브 1
 
FPN 리뷰
FPN 리뷰FPN 리뷰
FPN 리뷰
 
R-FCN 리뷰
R-FCN 리뷰R-FCN 리뷰
R-FCN 리뷰
 
basic of deep learning
basic of deep learningbasic of deep learning
basic of deep learning
 
파이썬 제대로 활용하기
파이썬 제대로 활용하기파이썬 제대로 활용하기
파이썬 제대로 활용하기
 
모던 C++ 정리
모던 C++ 정리모던 C++ 정리
모던 C++ 정리
 
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
 
LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)
LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)
LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)
 
InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...
InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...
InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...
 
딥러닝 중급 - AlexNet과 VggNet (Basic of DCNN : AlexNet and VggNet)
딥러닝 중급 - AlexNet과 VggNet (Basic of DCNN : AlexNet and VggNet)딥러닝 중급 - AlexNet과 VggNet (Basic of DCNN : AlexNet and VggNet)
딥러닝 중급 - AlexNet과 VggNet (Basic of DCNN : AlexNet and VggNet)
 
PyTorch 튜토리얼 (Touch to PyTorch)
PyTorch 튜토리얼 (Touch to PyTorch)PyTorch 튜토리얼 (Touch to PyTorch)
PyTorch 튜토리얼 (Touch to PyTorch)
 
Deep Convolutional GANs - meaning of latent space
Deep Convolutional GANs - meaning of latent spaceDeep Convolutional GANs - meaning of latent space
Deep Convolutional GANs - meaning of latent space
 
쉽게 설명하는 GAN (What is this? Gum? It's GAN.)
쉽게 설명하는 GAN (What is this? Gum? It's GAN.)쉽게 설명하는 GAN (What is this? Gum? It's GAN.)
쉽게 설명하는 GAN (What is this? Gum? It's GAN.)
 
문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)
문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)
문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)
 
신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)
신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)
신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)
 
HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법
HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법
HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법
 
Continuously Adaptive Mean Shift(CAMSHIFT)
Continuously Adaptive Mean Shift(CAMSHIFT)Continuously Adaptive Mean Shift(CAMSHIFT)
Continuously Adaptive Mean Shift(CAMSHIFT)
 

Recently uploaded

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 

Recently uploaded (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 

QT 프로그래밍 기초(basic of QT programming tutorial)

  • 2. October 5, 2018 2 Contents Installation Qt application Introduction Example
  • 3. October 5, 2018 3 Introduction Haavard Nord(left) and Eirik Chambe-Eng(right) Qt (/kjuːt/ "cute") : a cross-platform application framework that is widely used for developing application software “Write once, compile anywhere” (WOCA) “Q” “t” Haavard's Emacs typeface Inspired by Xt (X toolkit)
  • 4. October 5, 2018 4 Introduction A modern user interface that is beautiful on every screen and performs perfectly on every platform is not an option, it’s a necessity. — 8 of Top 10 Fortune 500 companies use Qt —
  • 5. October 5, 2018 5 Introduction If you want to know just what’s possible with Qt, all you have to do is look at how some of the leading companies in more than 70 industries are powering millions of devices all over the world including Rimac, Formlabs, AMD, Ubuntu, Imaginando, Xsens, Dolby Labs, Tableau, Holoplot, Ulstein, NXP, and many more.
  • 6. October 5, 2018 6 Introduction  Supported Platforms (Officially) Windows Windows 10 (64-bit) MSVC 2015 Windows 10 (32-bit) MSVC 2015 Windows 8.1 (64-bit) MSVC 2015, MSVC 2013, MinGW 5.3 , MinGW 4.9, MinGW 4.8 Windows 8.1 (32-bit) MSVC 2015, MSVC 2013, MinGW 5.3 , MinGW 4.9, MinGW 4.8 Windows 7 (64-bit) MSVC 2015, MSVC 2013, MinGW 5.3 , MinGW 4.9, MinGW 4.8 Windows 7 (32-bit) MSVC 2015, MSVC 2013, MinGW 5.3 , MinGW 4.9, MinGW 4.8 Mobile Platforms: Android, iOS, WinRT Windows Phone 8.1 (arm) MSVC 2013 Windows Runtime (x86, x86_64, arm) MSVC 2015, MSVC 2013 iOS 6 and above Clang as provided by Apple Android (API Level: 16) GCC as provided by Google Linux/X11 openSUSE 13.1 (64-bit) GCC 4.8.1 Red Hat Enterprise Linux 6.6 (64-bit) GCC 4.9.1 Ubuntu 14.04 (64-bit) GCC 4.6.3 (Linux 32/64-bit) GCC 4.8.1, GCC 4.9.1 OS X OS X 10.8, 10.9, 10.10, 10.11 Clang as provided by Apple Embedded Platforms: Embedded Linux, QNX Embedded Linux GCC QNX 6.6.0 (armv7le and x86) As provided by QNX
  • 9. October 5, 2018 9 Installation  Visual studio extension
  • 10. October 5, 2018 10 Installation  Visual studio extension
  • 11. October 5, 2018 11 Installation  Visual studio extension
  • 12. October 5, 2018 12 Installation  Visual studio extension
  • 13. October 5, 2018 13 Qt application  Creating a Qt application
  • 14. October 5, 2018 14 Qt application  Creating a Qt application
  • 15. October 5, 2018 15 Qt application  Creating a Qt application
  • 16. October 5, 2018 16 Qt application  Structure of Qt application
  • 17. October 5, 2018 17 Qt application  Structure of Qt application
  • 18. October 5, 2018 18 Qt application  Concept of signal and slot SIGNALEvent(Message) SLOTEvent handler(Function) ON_BN_CLICKED(id, memberFxn) connect(sender, signal, receiver, member, Qt::ConnectionType = Qt::AutoConnection)
  • 19. October 5, 2018 19 Qt application  Concept of signal and slot
  • 20. October 5, 2018 20 Qt application  Concept of signal and slot
  • 21. October 5, 2018 21 Qt application  Concept of signal and slot
  • 22. October 5, 2018 22 Qt application  ImageShowUsingQt
  • 23. October 5, 2018 23 Qt application  QPushButton & QFileDialog #pragma once #include <QtWidgets/QMainWindow> #include "ui_ImageShowUsingQt.h" class ImageShowUsingQt : public QMainWindow { Q_OBJECT public: ImageShowUsingQt(QWidget *parent = Q_NULLPTR); private: Ui::ImageShowUsingQtClass ui; }; #pragma once #include <QtWidgets/QMainWindow> #include "ui_ImageShowUsingQt.h" #include "QFileDialog" class ImageShowUsingQt : public QMainWindow { Q_OBJECT public: ImageShowUsingQt(QWidget *parent = Q_NULLPTR); private: Ui::ImageShowUsingQtClass ui; private slots: void LoadImage(); }; [ImageShowUsingQt.h]
  • 24. October 5, 2018 24 Qt application  QPushButton & QFileDialog [ImageShowUsingQt.cpp] #include "ImageShowUsingQt.h" ImageShowUsingQt::ImageShowUsingQt(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); } void ImageShowUsingQt::LoadImage() { ui.listWidget->clear(); HistoryImg.clear(); QString qsfileName = QFileDialog::getOpenFileName(this, tr("Open Image"), "../", tr("Image Files (*.png *.jpg *.bmp)")); InputImg = imread(qsfileName.toStdString()); ShowImage(InputImg); HistoryImg.push_back(InputImg); ui.listWidget->addItem("Original Image"); } QString getOpenFileName(QWidget *parent = Q_NULLPTR, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = Q_NULLPTR, Options options = Options());
  • 25. October 5, 2018 25 Qt application  QPushButton & QFileDialog [QString & std::string] QString -> std::string std::string -> QString QString qstring; std::string stdstring; stdstring = qstring.toStdString(); QString qstring; std::string stdstring; qstring.fromStdString(stdstring);
  • 26. October 5, 2018 26 Qt application  QRadioButton & QLineEdit void ImageShowUsingQt::Processing() { //lineedit lowthresh = ui.Lowvalue->text().toInt(); highthresh = ui.Highvalue->text().toInt(); //flag //-1 : default, 0 : sobel, 1 : Canny int flag = -1; if (ui.SobelButton->isChecked()) flag = 0; if (ui.CannyButton->isChecked()) flag = 1; if (flag == -1) { return; } else if (flag == 0) { cvtColor(InputImg, OutputImg, CV_BGR2GRAY); Sobel(OutputImg, OutputImg, CV_8UC1, 1, 1, 5); cvtColor(OutputImg, OutputImg, CV_GRAY2BGR); if (flag == -1) { return; } else if (flag == 0) { cvtColor(InputImg, OutputImg, CV_BGR2GRAY); Sobel(OutputImg, OutputImg, CV_8UC1, 1, 1, 5); cvtColor(OutputImg, OutputImg, CV_GRAY2BGR); ShowImage(OutputImg); HistoryImg.push_back(OutputImg); ui.listWidget->addItem("Sobel"); } else if (flag = 1) { cvtColor(InputImg, OutputImg, CV_BGR2GRAY); Canny(OutputImg, OutputImg, lowthresh, highthresh); cvtColor(OutputImg, OutputImg, CV_GRAY2BGR); ShowImage(OutputImg); HistoryImg.push_back(OutputImg); QString th; th.sprintf("Canny (low : %d, high : %d)", lowthresh, highthresh); ui.listWidget->addItem(th); } }
  • 27. October 5, 2018 27 Qt application  QCheckBox & QComboBox { Mat temp; cvtColor(InputImg, temp, CV_BGR2GRAY); cvtColor(temp, temp, CV_GRAY2BGR); ShowImage(temp); } }
  • 28. October 5, 2018 28 Qt application  QCheckBox & QComboBox void ImageShowUsingQt::Activation() { int i = ui.comboBox->currentIndex(); if (i == 0) { ui.RedButton->setCheckable(1); ui.BlueButton->setCheckable(1); ui.GreenButton->setCheckable(1); } else { ui.RedButton->setCheckable(0); ui.BlueButton->setCheckable(0); ui.GreenButton->setCheckable(0); } }
  • 29. October 5, 2018 29 Qt application  Dial
  • 30. October 5, 2018 30 Qt application  Dial void ImageShowUsingQt::IntensityControl() { Mat temp; vector<Mat> Channel; cvtColor(InputImg, temp, CV_BGR2HSV); split(temp, Channel); Channel[2]+=ui.dial->value(); merge(Channel, temp); cvtColor(temp, temp, CV_HSV2BGR); ShowImage(temp); }
  • 31. October 5, 2018 31 Qt application  QListWidget void ImageShowUsingQt::ShowHistory() { int i = ui.listWidget->currentRow(); ShowImage(HistoryImg[i]); } void ImageShowUsingQt::Processing() { //lineedit lowthresh = ui.Lowvalue->text().toInt(); highthresh = ui.Highvalue->text().toInt(); //flag //-1 : default, 0 : sobel, 1 : Canny int flag = -1; if (ui.SobelButton->isChecked()) flag = 0; if (ui.CannyButton->isChecked()) flag = 1; if (flag == -1) { return; } else if (flag == 0) { cvtColor(InputImg, OutputImg, CV_BGR2GRAY); Sobel(OutputImg, OutputImg, CV_8UC1, 1, 1, 5); cvtColor(OutputImg, OutputImg, CV_GRAY2BGR); ShowImage(OutputImg); HistoryImg.push_back(OutputImg); ui.listWidget->addItem("Sobel"); } else if (flag = 1) { cf. Processing
  • 32. October 5, 2018 32 Qt application  QGraphicsView void ImageShowUsingQt::ShowImage(Mat image) { image.copyTo(LastImg); scene.clear(); QImage qimg(image.data, image.cols, image.rows, QImage::Format_RGB888); scene.addPixmap(QPixmap::fromImage(qimg.rgbSwapped())); ui.graphicsView->setScene(&scene); ui.graphicsView->show(); }
  • 33. October 5, 2018 33 Qt application  ImageShowUsingQt - Demo