3#include "../_cexports/c_match_3d.h"
5#include "../affine_matrix_3d.hpp"
6#include "../global.hpp"
7#include "../point_cloud.hpp"
64 double maxDistanceStdDev,
65 double deltaThresholdRMS)
noexcept
88 maxModelPoints_ =
static_cast<std::int64_t>(maxModelPoints);
105 maxScenePoints_ =
static_cast<std::int64_t>(maxScenePoints);
113 int MaxIterations() const noexcept {
return static_cast<int>(params_.MaxIterations); }
122 params_.MaxIterations =
static_cast<CExports::cvbval_t
>(maxIterations);
137 void SetMaxDistanceStdDev(
double maxDistanceStdDev)
noexcept { params_.MaxDistanceStdDev = maxDistanceStdDev; }
151 void SetDeltaThresholdRMS(
double deltaThresholdRMS)
noexcept { params_.DeltaRmsThreshold = deltaThresholdRMS; }
157 CExports::CVM3DMatchParameters params_ = CExports::CVM3DDefaultParameters;
195 CExports::cvbval_t numIterations_;
214 Internal::DoResCall([&]() {
215 return CVB_CALL_CAPI(
216 CVM3DMatchDownsampledPointClouds(model.Handle(),
217 parameters.maxModelPoints_,
219 parameters.maxScenePoints_,
222 result.numIterations_,
223 *
reinterpret_cast<CExports::CVC3DTransformation *
>(&result.transformation_)));
237 return Internal::DoResCallValueOut<double>([&](
double &value) {
238 return CVB_CALL_CAPI(CVM3DRmsDistanceOfPointClouds(model.
Handle(), scene.
Handle(), value));
Affine transformation matrix for 3D.
Definition: affine_matrix_3d.hpp:98
A parameter set for matching and down sampling point clouds.
Definition: match_3d.hpp:35
std::size_t MaxScenePoints() const noexcept
Gets maximum number of scene points to use.
Definition: match_3d.hpp:96
void SetMaxIterations(int maxIterations) noexcept
Sets maximum number of iterations to execute.
Definition: match_3d.hpp:120
double MaxDistanceStdDev() const noexcept
Gets how far points are to be considered corresponding to a point.
Definition: match_3d.hpp:130
void SetMaxDistanceStdDev(double maxDistanceStdDev) noexcept
Sets how far points are to be considered corresponding to a point.
Definition: match_3d.hpp:137
MatchingParameters(std::size_t maxModelPoints, std::size_t maxScenePoints) noexcept
Create a parameter set to control the matching algorithm.
Definition: match_3d.hpp:46
void SetDeltaThresholdRMS(double deltaThresholdRMS) noexcept
Sets the threshold for RMS to stop iteration.
Definition: match_3d.hpp:151
void SetMaxScenePoints(std::size_t maxScenePoints) noexcept
Sets maximum number of scene points to use.
Definition: match_3d.hpp:103
std::size_t MaxModelPoints() const noexcept
Gets maximum number of model points to use.
Definition: match_3d.hpp:79
MatchingParameters(std::size_t maxModelPoints, std::size_t maxScenePoints, int maxIterations, double maxDistanceStdDev, double deltaThresholdRMS) noexcept
Create a parameter set to control the matching algorithm.
Definition: match_3d.hpp:61
int MaxIterations() const noexcept
Gets maximum number of iterations to execute.
Definition: match_3d.hpp:113
double DeltaThresholdRMS() const noexcept
Gets the threshold for RMS to stop iteration.
Definition: match_3d.hpp:144
void SetMaxModelPoints(std::size_t maxModelPoints) noexcept
Sets maximum number of model points to use.
Definition: match_3d.hpp:86
friend MatchingResult MatchDownsampledPointClouds(const PointCloud &model, const PointCloud &scene, const MatchingParameters ¶meters)
This function matches two point clouds.
Definition: match_3d.hpp:211
Results of a matching and down sampling operation.
Definition: match_3d.hpp:165
AffineMatrix3D Transformation() const noexcept
Get the affine transformation (rotation matrix and translation vector), which maps the scene to the m...
Definition: match_3d.hpp:182
int NumIterations() const noexcept
Get number of iterations needed.
Definition: match_3d.hpp:189
double DistanceRMS() const noexcept
Get the final root mean square of distances between model and scene.
Definition: match_3d.hpp:175
friend MatchingResult MatchDownsampledPointClouds(const PointCloud &model, const PointCloud &scene, const MatchingParameters ¶meters)
This function matches two point clouds.
Definition: match_3d.hpp:211
A point cloud object.
Definition: decl_point_cloud.hpp:49
void * Handle() const noexcept
Returns C-API style handle to Node Object.
Definition: decl_point_cloud.hpp:767
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24