summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/numeric.hpp
blob: 9d37086d286c050566819e534a0cc9db2f838e7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <opencv2/core.hpp>
#include <limits>

namespace types {
    using f = double;

    struct constants final
    {
        constants() = delete;
        static constexpr f eps = std::numeric_limits<f>::epsilon();
    };

    template<int n> using vec = cv::Vec<f, n>;
    using vec2 = vec<2>;
    using vec3 = vec<3>;

    template<int y, int x> using mat = cv::Matx<f, y, x>;
    using mat33 = mat<3, 3>;
    using mat22 = mat<2, 2>;
}