summaryrefslogtreecommitdiffhomepage
path: root/tracker-easy/settings.h
blob: b0f1441785e1b755b866f4ec98e3ca25ca15a100 (plain)
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
#pragma once

#include "options/options.hpp"
#include <opencv2/calib3d.hpp>

#include <QString>


namespace EasyTracker {

    using namespace options;

#ifdef __clang__
#   pragma clang diagnostic push
#   pragma clang diagnostic ignored "-Wweak-vtables"
#endif

    struct Settings final : options::opts
    {
        using slider_value = options::slider_value;

        value<QString> camera_name{ b, "camera-name", "" };
        value<int> cam_res_x{ b, "camera-res-width", 640 },
            cam_res_y{ b, "camera-res-height", 480 },
            cam_fps{ b, "camera-fps", 30 };
        value<int> iMinBlobSize{ b, "iMinBlobSize", 4 }, iMaxBlobSize{ b, "iMaxBlobSize", 15 };
        value<int> DeadzoneRectHalfEdgeSize { b, "deadzone-rect-half-edge-size", 1 };

        // Type of custom model
        value<bool> iCustomModelThree{ b, "iCustomModelThree", true };
        value<bool> iCustomModelFour{ b, "iCustomModelFour", false };
        value<bool> iCustomModelFive{ b, "iCustomModelFive", false };

        // Custom model vertices
        value<int> iVertexTopX{ b, "iVertexTopX", 0 }, iVertexTopY{ b, "iVertexTopY", 0 }, iVertexTopZ{ b, "iVertexTopZ", 0 };
        value<int> iVertexRightX{ b, "iVertexRightX", 0 }, iVertexRightY{ b, "iVertexRightY", 0 }, iVertexRightZ{ b, "iVertexRightZ", 0 };
        value<int> iVertexLeftX{ b, "iVertexLeftX", 0 }, iVertexLeftY{ b, "iVertexLeftY", 0 }, iVertexLeftZ{ b, "iVertexLeftZ", 0 };
        value<int> iVertexCenterX{ b, "iVertexCenterX", 0 }, iVertexCenterY{ b, "iVertexCenterY", 0 }, iVertexCenterZ{ b, "iVertexCenterZ", 0 };
        value<int> iVertexTopRightX{ b, "iVertexTopRightX", 0 }, iVertexTopRightY{ b, "iVertexTopRightY", 0 }, iVertexTopRightZ{ b, "iVertexTopRightZ", 0 };
        value<int> iVertexTopLeftX{ b, "iVertexTopLeftX", 0 }, iVertexTopLeftY{ b, "iVertexTopLeftY", 0 }, iVertexTopLeftZ{ b, "iVertexTopLeftZ", 0 };



        value<int> fov{ b, "camera-fov", 56 };

        value<bool> debug{ b, "debug", false };
        value<bool> iAutoCenter{ b, "iAutoCenter", true };
        value<int> iAutoCenterTimeout{ b, "iAutoCenterTimeout", 1000 };


        value<int> PnpSolver{ b, "pnp-solver", cv::SOLVEPNP_P3P };


        explicit Settings(const QString& name) : opts(name) {}
    };

#ifdef __clang__
#   pragma clang diagnostic pop
#endif

} //