21.02
|
Basic function to execute canny edge on Neon. More...
#include <NECannyEdge.h>
Public Member Functions | |
NECannyEdge (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Constructor. More... | |
NECannyEdge (const NECannyEdge &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NECannyEdge & | operator= (const NECannyEdge &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
~NECannyEdge () | |
Default destructor. More... | |
void | configure (ITensor *input, ITensor *output, int32_t upper_thr, int32_t lower_thr, int32_t gradient_size, int32_t norm_type, BorderMode border_mode, uint8_t constant_border_value=0) |
Initialise the function's source, destination, thresholds, gradient size, normalization type and border mode. More... | |
void | run () override |
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... | |
Basic function to execute canny edge on Neon.
This function calls the following Neon kernels and functions:
Definition at line 58 of file NECannyEdge.h.
NECannyEdge | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Constructor.
Initialize Sobel kernel to nullptr.
[in] | memory_manager | (Optional) Memory manager. |
Definition at line 48 of file NECannyEdge.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default destructor.
void configure | ( | ITensor * | input, |
ITensor * | output, | ||
int32_t | upper_thr, | ||
int32_t | lower_thr, | ||
int32_t | gradient_size, | ||
int32_t | norm_type, | ||
BorderMode | border_mode, | ||
uint8_t | constant_border_value = 0 |
||
) |
Initialise the function's source, destination, thresholds, gradient size, normalization type and border mode.
[in,out] | input | Source tensor. Data type supported: U8. (Written to only for border_mode != UNDEFINED) |
[out] | output | Destination tensor. Data type supported: U8. |
[in] | upper_thr | Upper threhold used for the hysteresis |
[in] | lower_thr | Lower threshold used for the hysteresis. |
[in] | gradient_size | Gradient size (3, 5 or 7) |
[in] | norm_type | Normalization type. If 1, L1-Norm otherwise L2-Norm |
[in] | border_mode | Border mode to use for the convolution. |
[in] | constant_border_value | (Optional) Constant value to use for borders if border_mode is set to CONSTANT. |
Definition at line 65 of file NECannyEdge.cpp.
References TensorAllocator::allocate(), Tensor::allocator(), ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_VAR, arm_compute::CONSTANT, ITensor::info(), arm_compute::test::validation::info, TensorAllocator::init(), TensorInfo::init(), MemoryGroup::manage(), arm_compute::S16, arm_compute::S32, arm_compute::test::validation::shape, ITensorInfo::tensor_shape(), arm_compute::U16, arm_compute::U32, arm_compute::U8, and arm_compute::UNDEFINED.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 169 of file NECannyEdge.cpp.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_MSG, ITensor::buffer(), Window::DimY, Window::DimZ, Scheduler::get(), ITensor::info(), IScheduler::schedule(), and ITensorInfo::total_size().