FastTrack 6.1.0
Tracks multiples objects dealing with occlusion and identities.
Loading...
Searching...
No Matches
autolevel.h
1/*
2This file is part of Fast Track.
3
4 FastTrack is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 FastTrack is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with FastTrack. If not, see <https://www.gnu.org/licenses/>.
16*/
17#ifndef AUTOLEVEL_H
18#define AUTOLEVEL_H
19
20#include <QHash>
21#include <algorithm>
22#include <functional>
23#include <opencv2/core/types.hpp>
24#include <string>
25#include "data.h"
26#include "tracking.h"
27#include "videoreader.h"
28
29using namespace std;
30
31class AutoLevel : public QObject {
32 Q_OBJECT
33
34 QString m_savedPath;
35 string m_path;
36 QString m_spotSuffix;
38 QHash<QString, QString> m_parameters;
40
41 double computeStdAngle(const Data &data);
42 double computeStdDistance(const Data &data);
43 double computeStdArea(const Data &data);
44 double computeStdPerimeter(const Data &data);
45
46 public:
47 explicit AutoLevel(QWidget *parent = nullptr) : QObject(parent){};
48 ~AutoLevel();
49 AutoLevel(const string &path, const UMat &background, const QHash<QString, QString> &parameters);
50 AutoLevel(const AutoLevel &T) = delete;
51 AutoLevel &operator=(const AutoLevel &T) = delete;
52 AutoLevel &operator=(AutoLevel &&T) = delete;
53 AutoLevel(AutoLevel &&T) = delete;
54 static double stdev(const QList<double> &vect);
55
56 public slots:
57 QHash<QString, double> level();
58
59 signals:
60 void forceFinished(QString message);
61 void levelParametersChanged(QHash<QString, double>);
62 void finished();
63};
64
65#endif
Definition autolevel.h:31
double computeStdDistance(const Data &data)
Compute the standard deviation of the distance distribution.
Definition autolevel.cpp:163
QHash< QString, QString > m_parameters
Definition autolevel.h:38
UMat m_background
Definition autolevel.h:37
double computeStdPerimeter(const Data &data)
Compute the standard deviation of the angle distribution.
Definition autolevel.cpp:210
int m_endImage
Definition autolevel.h:39
QString m_spotSuffix
Definition autolevel.h:36
double computeStdArea(const Data &data)
Compute the standard deviation of the area distribution.
Definition autolevel.cpp:191
QHash< QString, double > level()
Levels the tracking parameters.
Definition autolevel.cpp:65
QString m_savedPath
Definition autolevel.h:34
double computeStdAngle(const Data &data)
Compute the standard deviation of the angle distribution.
Definition autolevel.cpp:140
static double stdev(const QList< double > &vect)
Compute the std from a vector.
Definition autolevel.cpp:127
string m_path
Definition autolevel.h:35
This class allows to load tracking data produced by the Tracking class.
Definition data.h:24