image
In this web site, it provides a lot of benchmark for multiple object tracking.

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
This time we are going to create a new Object intead of using subclass of QThread,and all its job is transfer to a QThread instance by calling moveToThread method.You can find out details on youtube.
Let’s create a new project of window application and add new class, in which it accumaltes from 1 to 999. 

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
A good example for writing QThread with a GUI.
Here is another similar example:QT5 TUTORIAL QTHREADS - GUI THREAD - 2020

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
A good example that help you learn how to handle mouse events

me1237guy 發表在 痞客邦 留言(0) 人氣()

image


cv::Mat img(cv::Size(800, 800), CV_8UC3);


 


 // big region of interest (ROI)


 Rect roi(100, 100, 400, 400);


 rectangle(img, roi, Scalar(255, 0, 0), 1);


 


 // some rectangles


 vector<Rect> lpROIs;


 lpROIs.push_back(Rect(30, 50, 100, 100));


 lpROIs.push_back(Rect(420, 250, 100, 100));


 lpROIs.push_back(Rect(150, 140, 100, 100));


 lpROIs.push_back(Rect(300, 100, 100, 100));


 lpROIs.push_back(Rect(250, 250, 100, 100));


 lpROIs.push_back(Rect(300, 450, 100, 100));


 


 // check out if the rectangle inside the ROI


 for(int i=0; i<lpROIs.size(); i++)


 {


 // inside the ROI


 if( (roi&lpROIs[i])==lpROIs[i] )


 rectangle(img, lpROIs[i], Scalar(0,0,255), -1);


 else


 rectangle(img, lpROIs[i], Scalar(0,255,0), 1);


 }


 


 imshow("img", img);


 waitKey();


me1237guy 發表在 痞客邦 留言(0) 人氣()

A good example that shows image processing by using OpenCV with Qt IDE.

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
First, set up OpenCV building environments
INCLUDEPATH += C:\OpenCV\OpenCV4.2.0DNN\include
LIBS += -LC:\OpenCV\OpenCV4.2.0DNN\lib \
-lopencv_world420

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
First, set up OpenCV building environments
INCLUDEPATH += C:\OpenCV\OpenCV4.2.0DNN\include
LIBS += -LC:\OpenCV\OpenCV4.2.0DNN\lib \
-lopencv_world420

me1237guy 發表在 痞客邦 留言(0) 人氣()


You can get all tabBars contained in a tabWidget by using findChild, which is a method of QTabWidget.After that, you can hide them at once.
 
QTabBar *tabBar = ui->tabWidget->findChild<QTabBar *>();
tabBar->hide();

me1237guy 發表在 痞客邦 留言(0) 人氣()

image

mainwindow.h
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
 
#include <QMainWindow>
#include <QtConcurrent/QtConcurrentRun>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
 
class MainWindow : public QMainWindow
{
 Q_OBJECT
 
public:
 MainWindow(QWidget *parent = nullptr);
 ~MainWindow();
 
private slots:
 void on_pushButton_start_clicked();
 
 void on_pushButton_stop_clicked();
 
private:
 Ui::MainWindow *ui;
 int counter;
 bool running;
 
private:
 void addCounter();
};
#endif // MAINWINDOW_H

me1237guy 發表在 痞客邦 留言(0) 人氣()

image

me1237guy 發表在 痞客邦 留言(0) 人氣()

image

Change tabPosition
Change tabShape

me1237guy 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。