21.02
|
Basic function to execute laplacian pyramid. More...
#include <CLLaplacianPyramid.h>
Public Member Functions | |
CLLaplacianPyramid () | |
Constructor. More... | |
void | configure (ICLTensor *input, CLPyramid *pyramid, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value) |
Initialise the function's source, destinations and border mode. More... | |
void | configure (const CLCompileContext &compile_context, ICLTensor *input, CLPyramid *pyramid, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value) |
Initialise the function's source, destinations 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 laplacian pyramid.
This function calls the following OpenCL kernels and functions:
First a Gaussian pyramid is created. Then, for each level i, the corresponding tensor I(i) is blurred with the Gaussian 5x5 filter, and then difference between the two tensors is the corresponding level L(i) of the Laplacian pyramid. L(i) = I(i) - Gaussian5x5(I(i)) Level 0 has always the same first two dimensions as the input tensor.
Definition at line 57 of file CLLaplacianPyramid.h.
Constructor.
Definition at line 41 of file CLLaplacianPyramid.cpp.
void configure | ( | ICLTensor * | input, |
CLPyramid * | pyramid, | ||
ICLTensor * | output, | ||
BorderMode | border_mode, | ||
uint8_t | constant_border_value | ||
) |
Initialise the function's source, destinations and border mode.
[in] | input | Source tensor. Data types supported: U8. |
[out] | pyramid | Destination pyramid tensors, Data types supported at each level: S16. |
[out] | output | The lowest resolution tensor necessary to reconstruct the input tensor from the pyramid. Data types supported: S16. The first two dimensions of this tensor must match the first two dimensions of the tensor in the last level of the pyramid, that is: output.width = input.width() / pow(2,pyramid_levels-1) and out.height = in.height() / pow(2,pyramid_levels-1) |
[in] | border_mode | Border mode to use. |
[in] | constant_border_value | (Optional) Constant value to use for borders if border_mode is set to CONSTANT. |
Definition at line 52 of file CLLaplacianPyramid.cpp.
References CLKernelLibrary::get().
void configure | ( | const CLCompileContext & | compile_context, |
ICLTensor * | input, | ||
CLPyramid * | pyramid, | ||
ICLTensor * | output, | ||
BorderMode | border_mode, | ||
uint8_t | constant_border_value | ||
) |
Initialise the function's source, destinations and border mode.
[in] | compile_context | The compile context to be used. |
[in] | input | Source tensor. Data types supported: U8. |
[out] | pyramid | Destination pyramid tensors, Data types supported at each level: S16. |
[out] | output | The lowest resolution tensor necessary to reconstruct the input tensor from the pyramid. Data types supported: S16. The first two dimensions of this tensor must match the first two dimensions of the tensor in the last level of the pyramid, that is: output.width = input.width() / pow(2,pyramid_levels-1) and out.height = in.height() / pow(2,pyramid_levels-1) |
[in] | border_mode | Border mode to use. |
[in] | constant_border_value | (Optional) Constant value to use for borders if border_mode is set to CONSTANT. |
Definition at line 57 of file CLLaplacianPyramid.cpp.
References CLPyramid::allocate(), ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, CLDepthConvertLayer::configure(), CLGaussianPyramidHalf::configure(), ITensorInfo::dimension(), CLPyramid::get_pyramid_level(), PyramidInfo::height(), ITensor::info(), CLPyramid::info(), arm_compute::test::validation::info, CLPyramid::init(), PyramidInfo::init(), PyramidInfo::num_levels(), arm_compute::S16, PyramidInfo::tensor_shape(), arm_compute::U8, PyramidInfo::width(), and arm_compute::WRAP.
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 95 of file CLLaplacianPyramid.cpp.
References ARM_COMPUTE_ERROR_ON_MSG, ICLSimpleFunction::run(), and CLGaussianPyramidHalf::run().