-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworker-thread.h
More file actions
56 lines (50 loc) · 1.15 KB
/
worker-thread.h
File metadata and controls
56 lines (50 loc) · 1.15 KB
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
51
52
53
54
55
56
#ifndef WORKERTHREAD_H
#define WORKERTHREAD_H
#include <QThread>
#include <QImage>
#include "perceptron.h"
class MainWindow;
enum Operation
{
LoadFile,
TrainModel,
RecognizeImage
};
class WorkerThread : public QThread
{
Q_OBJECT
public:
WorkerThread(MainWindow *pWindow);
//
~WorkerThread();
// тип вычислительной операции
Operation m_nOperation;
// геттер для m_ptrResult
const QImage *getResultImage() const;
// геттер для m_imgType
int getImgType() const;
//
void startLoadFile(const QString &rcFilePath);
//
void startTrainModel();
//
void startClassifyImage(const QImage &rcImageInput);
//
void stop();
// создание сети
void createModel(int nSensors, int nHiddenLayers, int nHiddenNeurons, int nPatterns);
signals:
void canceled();
private:
//
Perceptron *m_Perceptron;
//
MainWindow *m_pWindow;
QString m_FilePath;
QScopedPointer<QImage> m_ptrInput, m_ptrResult;
// класс изображения
int m_imgType;
//
virtual void run();
};
#endif // WORKERTHREAD_H