Compute Library
18.05
|
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 | 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 54 of file CLLaplacianPyramid.h.
Constructor.
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. |
|
overridevirtual |
Run the kernels contained in the function.
For NEON kernels:
For OpenCL kernels:
Implements IFunction.