CVB++ 15.0
local_maximum.hpp
1#pragma once
2
3#include "global.hpp"
4
5#include "point_2d.hpp"
6
7namespace Cvb
8{
9
10CVB_BEGIN_INLINE_NS
11
13
15class LocalMaximum final
16{
17 public:
18
19 LocalMaximum() noexcept = default;
20
21 explicit LocalMaximum(double* data) noexcept
22 : position_(data[0], data[1])
23 , value_(data[2])
24 {
25 }
26
28
32 double X() const noexcept
33 {
34 return position_.X();
35 }
36
38
42 double Y() const noexcept
43 {
44 return position_.Y();
45 }
46
48
52 Point2D<double> Position() const noexcept
53 {
54 return position_;
55 }
56
58
62 double Value() const noexcept
63 {
64 return value_;
65 }
66
67
68
69
70 private:
71
72 Point2D<double> position_;
73 double value_ = 0.0;
74};
75
76CVB_END_INLINE_NS
77
78}
Result type returned by the FindLocalMaxima function.
Definition: local_maximum.hpp:16
double Value() const noexcept
Gray value of the local maximum.
Definition: local_maximum.hpp:62
Point2D< double > Position() const noexcept
Position of the local maximum (X, Y).
Definition: local_maximum.hpp:52
double Y() const noexcept
Y-position of the local maximum.
Definition: local_maximum.hpp:42
double X() const noexcept
X-position of the local maximum.
Definition: local_maximum.hpp:32
T X() const noexcept
Gets the x-component of the point.
Definition: point_2d.hpp:86
T Y() const noexcept
Gets the y-component of the point.
Definition: point_2d.hpp:106
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24