forked from torrtuga/QT-App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdlibxml.h
32 lines (28 loc) · 805 Bytes
/
dlibxml.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
#ifndef DLIBXML_H
#define DLIBXML_H
#include "imagelist.h"
#include <QDebug>
#include <QXmlStreamWriter>
#include <QXmlStreamReader>
#include <QFile>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
//need path, name of image, box i.e top,left,width,height
//need to transform the coordinates
using namespace cv;
class DlibXML
{
string name;
Rect rect;
map<double,QPointF>oldPoints;
double antiScalingFactorX,antiScalingFactorY;
QString doubleToStr();
map<double,QPointF> getNewPoints();
void createXMLFile(vector<string> fileNames,string path);
public:
DlibXML();
DlibXML(string name, map<double,QPointF> points, Rect rectangle,double scalingFactorX, double scalingFactorY);
void generateXML();
void createSingleXMLFile();
};
#endif // DLIBXML_H