Compute Library
 21.02
CLNonMaximaSuppression3x3 Class Reference

Basic function to execute non-maxima suppression over a 3x3 window. More...

#include <CLNonMaximaSuppression3x3.h>

Collaboration diagram for CLNonMaximaSuppression3x3:
[legend]

Public Member Functions

void configure (ICLTensor *input, ICLTensor *output, BorderMode border_mode)
 Initialise the function's source, destinations and border mode. More...
 
void configure (const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, BorderMode border_mode)
 Initialise the function's source, destinations and border mode. More...
 
- Public Member Functions inherited from ICLSimpleFunction
 ICLSimpleFunction (CLRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 ICLSimpleFunction (const ICLSimpleFunction &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 ICLSimpleFunction (ICLSimpleFunction &&)=default
 Default move constructor. More...
 
ICLSimpleFunctionoperator= (const ICLSimpleFunction &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
ICLSimpleFunctionoperator= (ICLSimpleFunction &&)=default
 Default move assignment operator. More...
 
 ~ICLSimpleFunction ()
 Default destructor. More...
 
void run () override final
 Run the kernels contained in the function. More...
 
- Public Member Functions inherited from IFunction
virtual ~IFunction ()=default
 Destructor. More...
 
virtual void prepare ()
 Prepare the function for executing. More...
 

Detailed Description

Basic function to execute non-maxima suppression over a 3x3 window.

This function calls the following CL kernels:

  1. CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE)
  2. CLNonMaximaSuppression3x3Kernel
Deprecated:
This function is deprecated and is intended to be removed in 21.05 release

Definition at line 43 of file CLNonMaximaSuppression3x3.h.

Member Function Documentation

◆ configure() [1/2]

void configure ( ICLTensor input,
ICLTensor output,
BorderMode  border_mode 
)

Initialise the function's source, destinations and border mode.

Note
The implementation supports just 2 border modes: UNDEFINED and CONSTANT The constant values used with CONSTANT border mode is 0
Parameters
[in,out]inputSource tensor. Data types supported: U8, F32. (Written to only for border_mode != UNDEFINED)
[out]outputDestination for the Non-Maxima suppressions 3x3. Data types supported: same as input.
[in]border_modeBorder mode to use for non-maxima suppression. The implementation supports just 2 border modes: UNDEFINED and CONSTANT

Definition at line 33 of file CLNonMaximaSuppression3x3.cpp.

References CLKernelLibrary::get().

Referenced by CLFastCorners::configure(), and CLHarrisCorners::configure().

34 {
35  configure(CLKernelLibrary::get().get_compile_context(), input, output, border_mode);
36 }
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
void configure(ICLTensor *input, ICLTensor *output, BorderMode border_mode)
Initialise the function&#39;s source, destinations and border mode.

◆ configure() [2/2]

void configure ( const CLCompileContext compile_context,
ICLTensor input,
ICLTensor output,
BorderMode  border_mode 
)

Initialise the function's source, destinations and border mode.

Note
The implementation supports just 2 border modes: UNDEFINED and CONSTANT The constant values used with CONSTANT border mode is 0
Parameters
[in]compile_contextThe compile context to be used.
[in,out]inputSource tensor. Data types supported: U8, F32. (Written to only for border_mode != UNDEFINED)
[out]outputDestination for the Non-Maxima suppressions 3x3. Data types supported: same as input.
[in]border_modeBorder mode to use for non-maxima suppression. The implementation supports just 2 border modes: UNDEFINED and CONSTANT

Definition at line 38 of file CLNonMaximaSuppression3x3.cpp.

References arm_compute::CONSTANT, and arm_compute::UNDEFINED.

39 {
40  auto k = std::make_unique<CLNonMaximaSuppression3x3Kernel>();
41  k->configure(compile_context, input, output, border_mode == BorderMode::UNDEFINED);
42  _kernel = std::move(k);
43 
44  if(border_mode != BorderMode::UNDEFINED)
45  {
46  _border_handler->configure(compile_context, input, _kernel->border_size(), BorderMode::CONSTANT);
47  }
48  else
49  {
50  _border_handler->configure(compile_context, input, _kernel->border_size(), BorderMode::UNDEFINED);
51  }
52 }
Borders are left undefined.

The documentation for this class was generated from the following files: