faceviewer.h
853 Bytes
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
#ifndef BR_FACEVIEWER_H
#define BR_FACEVIEWER_H
#include <openbr/openbr_plugin.h>
#include <openbr/gui/templateviewer.h>
namespace br
{
class BR_EXPORT FaceViewer : public TemplateViewer
{
Q_OBJECT
int index;
double selectionDistance;
bool dragging;
public:
explicit FaceViewer(QWidget *parent = 0);
public slots:
void setFile(const br::File &file_);
protected slots:
void mouseMoveEvent(QMouseEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void paintEvent(QPaintEvent *event);
private:
void refreshImage();
QRect getImageRect(const QPointF &ip, const QSize &size) const;
QRectF getScreenRect(const QPointF &sp, int width_, int height_) const;
signals:
void newLandmarks(QStringList, QList<QPointF>);
};
}
#endif // BR_FACEVIEWER_H