-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathphotoclipping.h
85 lines (78 loc) · 1.81 KB
/
photoclipping.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
#ifndef PHOTOCLIPPING_H
#define PHOTOCLIPPING_H
#include <QWidget>
#include <MyQclass.h>
#include <MyQView.h>
#include <QGraphicsObject>
#include <QGraphicsScene>
#include <QSettings>
#include <fstream>
namespace Ui {
class photoclipping;
}
class photoclipping : public QWidget
{
Q_OBJECT
public:
explicit photoclipping(QWidget *parent = 0);
~photoclipping();
int drawImage(QString filepath);
void CorrectCoordinatesOfOutside(int &x, int &y);
void photoSaveImage(cv::Mat src);
void setFileList(QString dirpath);
private slots:
void onPushSelectFolder();
void onPushSaveto();
void onMouseMovedGraphicsImage(int x, int y ,Qt::MouseButton button);
void onMouseReleasedGraphicImage(int x, int y ,Qt::MouseButton button);
void onPushSkip();
void onPushRevert();
void currentIndexChangedLabel();
private:
Ui::photoclipping *ui;
void connectSignals();
void outputtxt();
MyQclass myq;
int count;
int save_count;
cv::Mat img_now;
QFileInfoList imglist;
QGraphicsScene scene;
std::vector<QString> RecentImg;
QSettings settings;
std::vector<QString> points;
struct object_tmp
{
QString label;
QString center;
QString box;
};
struct image_tmp
{
QString fn;
QString filename;
QString size;
QString database;
QString groundtruth;
std::vector<object_tmp> obj_tmp;
};
struct yolo_tmp
{
QString fn;
float x;
float y;
float w;
float h;
};
std::vector<yolo_tmp> YOLOimg_tmp;
std::vector<image_tmp> img_tmp;
void wheelEvent(QWheelEvent *pEvent);
struct cursur_point
{
int x;
int y;
}c_point;
QDir working_directory;
void updatescene();
};
#endif // PHOTOCLIPPING_H