You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
#pragma once
|
|
#include <QThread>
|
|
#include <QDebug>
|
|
#include <QDateTime>
|
|
#include <opencv2/opencv.hpp>
|
|
#include <opencv2/imgproc/types_c.h>
|
|
#include "SyncQueue.h"
|
|
#include "ASyncQueue.h"
|
|
#include "common.h"
|
|
|
|
class WorkThread : public QThread
|
|
{
|
|
Q_OBJECT
|
|
#ifndef SYNC_CAMERA
|
|
signals:
|
|
void notify(int Num, int Cnt, cv::Mat);
|
|
void display_timecost(int Num, int ms);
|
|
void display_check_total(int Num, long no);
|
|
void display_jd_no(int Num, QString jd_no);
|
|
|
|
void event_ok(int Num);
|
|
void event_ng(int Num);
|
|
#endif
|
|
|
|
public:
|
|
WorkThread(QObject* parent = 0) : QThread(parent)
|
|
{
|
|
|
|
}
|
|
~WorkThread();
|
|
|
|
void init(SyncQueue<std::pair<int, cv::Mat>>* image_ptr, ASyncQueue<bool>* result_ptr, int classid, int Num);
|
|
void start_work();
|
|
void stop();
|
|
protected:
|
|
void run();
|
|
public:
|
|
int local_camera_number;
|
|
int local_classid;
|
|
SyncQueue<std::pair<int, cv::Mat>>* local_g_image_queue;
|
|
ASyncQueue<bool>* local_g_result_queue;
|
|
bool b_quit;
|
|
long frame_total;
|
|
SysConf local_SysConf;
|
|
DisplayLabelConf local_DisplayLabelConf;
|
|
};
|