43 return std::get<2>(lhs) > std::get<2>(rhs);
48 : _num_corner_candidates(), _min_distance(0.0f), _in_out(nullptr), _output(nullptr)
61 _min_distance = min_distance * min_distance;
62 _num_corner_candidates = num_corner_candidates;
63 ICPPKernel::configure(
Window());
78 const int32_t num_corner_candidates = *_num_corner_candidates;
84 for(int32_t i = 0; i < num_corner_candidates; ++i)
86 if(std::get<2>(_in_out[i]) != 0.0f)
89 const auto xc = std::get<0>(_in_out[i]);
90 const auto yc = std::get<1>(_in_out[i]);
94 keypt.
strength = std::get<2>(_in_out[i]);
99 for(int32_t k = i + 1; k < num_corner_candidates; ++k)
101 const float dx = std::fabs(std::get<0>(_in_out[k]) - xc);
102 const float dy = std::fabs(std::get<1>(_in_out[k]) - yc);
104 if((dx < _min_distance) && (dy < _min_distance))
106 const float d = (dx * dx + dy * dy);
108 if(d < _min_distance)
111 std::get<2>(_in_out[k]) = 0.0f;
bool keypoint_compare(const InternalKeypoint &lhs, const InternalKeypoint &rhs)
const Window & window() const
The maximum window the kernel can be executed on.
int32_t tracking_status
Status initialized to 1 by the corner detector, set to 0 when the point is lost.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Copyright (c) 2017-2021 Arm Limited.
float strength
Strength of the point.
void configure(InternalKeypoint *in_out, IKeyPointArray *output, const int32_t *num_corner_candidates, float min_distance)
Initialise the kernel's source, destination and border mode.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
#define ARM_COMPUTE_ERROR_ON_MISMATCHING_WINDOWS(f, w)
CPPSortEuclideanDistanceKernel()
Default constructor.
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
bool is_parallelisable() const override
Indicates whether or not the kernel is parallelisable.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
Information about executing thread and CPU.
void run(const Window &window, const ThreadInfo &info) override
Execute the kernel on the passed window.
bool push_back(const T &val)
Append the passed argument to the end of the array if there is room.
Describe a multidimensional execution window.