FastTrack 6.1.0
Tracks multiples objects dealing with occlusion and identities.
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 <QMap>
22#include <algorithm>
23#include <functional>
24#include <opencv2/core/types.hpp>
25#include <string>
26#include "data.h"
27#include "tracking.h"
28#include "videoreader.h"
29
30using namespace std;
31
32class AutoLevel : public QObject {
33 Q_OBJECT
34
36 string m_path;
37 QString m_spotSuffix;
39 QMap<QString, QString> m_parameters;
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 AutoLevel() = default;
48 AutoLevel(const string &path, const UMat &background, const QMap<QString, QString> &parameters);
49 AutoLevel(const AutoLevel &T) = delete;
50 AutoLevel &operator=(const AutoLevel &T) = delete;
51 static double stdev(const QList<double> &vect);
52
53 public slots:
54 QMap<QString, double> level();
55
56 signals:
57 void forceFinished(QString message);
58 void levelParametersChanged(QMap<QString, double>);
59 void finished();
60};
61
62#endif
Definition: autolevel.h:32
double computeStdDistance(const Data &data)
Compute the standard deviation of the distance distribution.
Definition: autolevel.cpp:161
UMat m_background
Definition: autolevel.h:38
double computeStdPerimeter(const Data &data)
Compute the standard deviation of the angle distribution.
Definition: autolevel.cpp:208
int m_endImage
Definition: autolevel.h:35
QString m_spotSuffix
Definition: autolevel.h:37
double computeStdArea(const Data &data)
Compute the standard deviation of the area distribution.
Definition: autolevel.cpp:189
QMap< QString, QString > m_parameters
Definition: autolevel.h:39
double computeStdAngle(const Data &data)
Compute the standard deviation of the angle distribution.
Definition: autolevel.cpp:138
QMap< QString, double > level()
Levels the tracking parameters.
Definition: autolevel.cpp:53
static double stdev(const QList< double > &vect)
Compute the std from a vector.
Definition: autolevel.cpp:125
string m_path
Definition: autolevel.h:36
This class allows to load tracking data produced by the Tracking class.
Definition: data.h:24