-
Notifications
You must be signed in to change notification settings - Fork 0
/
labeltool.h
89 lines (72 loc) · 1.6 KB
/
labeltool.h
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#pragma execution_character_set("utf-8")
#ifndef LABELTOOL_H
#define LABELTOOL_H
#include <QtWidgets/QMainWindow>
#include "ui_labeltool.h"
#include<qlayout.h>
#include<iostream>
#include<qstring.h>
#include<string>
#include<qfiledialog.h>
#include<core.hpp>
#include<cv.h>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/core/core.hpp>
#include<qmessagebox.h>
#include<vector>
#include<MyLabel.h>
#include <stdlib.h>
#include <stdio.h>
#include <fstream>
#include<qstringlist.h>
#include<cstdio>
#include<map>
using namespace std;
using namespace cv;
class LabelTool : public QMainWindow
{
Q_OBJECT
public:
LabelTool(QWidget *parent = 0);
~LabelTool();
void setConnections();
public:
QWidget *widget;
QVBoxLayout *verticalLayout;
QWidget* centralWidget;
MyLabel* myLabel;
QString fileName;
int labeled_image ;
vector<vector<int>> labels;
Mat src ;
double rate;
double zoom_percent;
void showLabel();
void showLabel(QString label_path);
void clearAll();
void showImage(QString path);
QString numbers;
vector<QString> files;
map<QString,QString> labeld_files;
map<QString,QString>::iterator label_files_pointer;
int current_index;
void changeLabelsToPoints();
private:
Ui::LabelToolClass ui;
public slots:
bool openImgSlot();
bool openDirSlot();
void openLabelSlot();
void labelSlot();
void clearLabelSlot();
void saveLabelSlot();
bool getNextImageSlot();
void rotateImageSlot();
void imageZoomInSlot();
void imageZoomOutSlot();
void deleteImageSlot();
bool openLabelDirSlot();
void getNextLabeledImageSlot();
};
#endif // LABELTOOL_H