CVB++ 15.0
teach_parameters.hpp
1#pragma once
2
3#include "dnc.hpp"
4
5namespace Cvb
6{
7
8 CVB_BEGIN_INLINE_NS
9
10 namespace Dnc
11 {
12
14
16#pragma pack(push, 4)
17 class TeachParameters final
18 {
19 public:
21
24 TeachParameters() = default;
25
28
38 double HeightSensitivity() const noexcept
39 {
40 return heightSensitivity_;
41 }
42
45
52 void SetHeightSensitivity(double value)
53 {
54 if (value < 0.0)
55 throw std::invalid_argument("HeightSensitivity must not be < 0.0");
56 heightSensitivity_ = value;
57 }
58
60
73 int DerivativePatchSize() const noexcept
74 {
75 return derivativePatchSize_;
76 }
77
79
86 void SetDerivativePatchSize(int value)
87 {
88 if (value < 3)
89 throw std::invalid_argument("DerivativePatchSize must not be < 3");
90 derivativePatchSize_ = value;
91 }
92
94
103 int LocalDistributionSize() const noexcept
104 {
105 return localDistributionSize_;
106 }
107
109
117 {
118 if (value < 0)
119 throw std::invalid_argument("LocalDistributionSize must not be < 0");
120 localDistributionSize_ = value;
121 }
122
124
133 int NumGradientFeatures() const noexcept
134 {
135 return numGradientFeatures_;
136 }
137
139
147 {
148 if (value < 0)
149 throw std::invalid_argument("NumGradientFeatures must not be < 0");
150 numGradientFeatures_ = value;
151 }
152
154
163 int NumNormalFeatures() const noexcept
164 {
165 return numNormalFeatures_;
166 }
167
169
176 void SetNumNormalFeatures(int value)
177 {
178 if (value < 0)
179 throw std::invalid_argument("NumNormalFeatures must not be < 0");
180 numNormalFeatures_ = value;
181 }
182
184
193 int ICPShrink() const noexcept
194 {
195 return icpShrink_;
196 }
197
199
206 void SetICPShrink(int value)
207 {
208 if (value < 1)
209 throw std::invalid_argument("ICPShrink must not be < 1");
210 icpShrink_ = value;
211 }
212
214
223 double DistanceKernelSize() const noexcept
224 {
225 return distanceKernelSize_;
226 }
227
229
236 void SetDistanceKernelSize(double value)
237 {
238 if (value < 1.0)
239 throw std::invalid_argument("DistanceKernelSize must not be < 1.0");
240 distanceKernelSize_ = value;
241 }
242
243 private:
244 double heightSensitivity_ = 1.0;
245 int derivativePatchSize_ = 3;
246 int localDistributionSize_ = 8;
247 int numGradientFeatures_ = 100;
248 int numNormalFeatures_ = 100;
249 int icpShrink_ = 4;
250 double distanceKernelSize_ = 2.0;
251 };
252#pragma pack(pop)
253
254 } // namespace Dnc
255
256 CVB_END_INLINE_NS
257
258} // namespace Cvb
void SetNumNormalFeatures(int value)
Set the number of normal vector features retained in the classifier.
Definition teach_parameters.hpp:176
double DistanceKernelSize() const noexcept
Get the factor for distance transform calculation.
Definition teach_parameters.hpp:223
int DerivativePatchSize() const noexcept
Get smoothing area in pixels for gradient and normal calculation.
Definition teach_parameters.hpp:73
int NumNormalFeatures() const noexcept
Get the number of normal vector features retained in the classifier.
Definition teach_parameters.hpp:163
TeachParameters()=default
Default teach parameters.
void SetNumGradientFeatures(int value)
Set the number of gradient features retained in the classifier.
Definition teach_parameters.hpp:146
void SetDistanceKernelSize(double value)
Set the factor for Distance transform calculation.
Definition teach_parameters.hpp:236
void SetDerivativePatchSize(int value)
Set smoothing area in pixels for gradient and normal calculation.
Definition teach_parameters.hpp:86
void SetICPShrink(int value)
Set the subsample factor for ICP.
Definition teach_parameters.hpp:206
void SetHeightSensitivity(double value)
Set the minimum gradient magnitude to accept a local gradient as a feature in the depth images.
Definition teach_parameters.hpp:52
int NumGradientFeatures() const noexcept
Get the number of gradient features retained in the classifier.
Definition teach_parameters.hpp:133
int LocalDistributionSize() const noexcept
Get the size of area in which local features are distributed (in pixels).
Definition teach_parameters.hpp:103
double HeightSensitivity() const noexcept
Get the minimum gradient magnitude to accept a local gradient as a feature in the depth images.
Definition teach_parameters.hpp:38
void SetLocalDistributionSize(int value)
Set the size of area in which local features are distributed (in pixels).
Definition teach_parameters.hpp:116
int ICPShrink() const noexcept
Get the subsample factor for ICP.
Definition teach_parameters.hpp:193
Namespace for Match3D DNC (CAD-based 3D-object recognition).
Definition dnc.hpp:27
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17