21.02
|
Basic function to execute laplacian reconstruction. More...
#include <CLLaplacianReconstruct.h>
Public Member Functions | |
CLLaplacianReconstruct () | |
Constructor. More... | |
void | configure (const CLPyramid *pyramid, ICLTensor *input, 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, const CLPyramid *pyramid, ICLTensor *input, 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 reconstruction.
This function calls the following OpenCL kernels and functions:
This function reconstructs the original image from a Laplacian Image Pyramid.
The input image is added to the last level of the Laplacian pyramid L(n-2), the resulting image is upsampled to the resolution of the next pyramid level.
I(n-2) = upsample( input + L(n-1)
For each pyramid level i, except i=0 and i=n-1: I(i-1) = upsample(I(i) + L(i))
output = I(0) + L(0)
Definition at line 63 of file CLLaplacianReconstruct.h.
Constructor.
Definition at line 38 of file CLLaplacianReconstruct.cpp.
void configure | ( | const CLPyramid * | pyramid, |
ICLTensor * | input, | ||
ICLTensor * | output, | ||
BorderMode | border_mode, | ||
uint8_t | constant_border_value | ||
) |
Initialise the function's source, destinations and border mode.
The Output image must have the same size as the first level of the pyramid. The Input image must have the same size as the last level of the pyramid.
The idea is to reconstuct the original hi-res image from a low-res representation of it and the laplacian pyramid.
[in] | pyramid | Laplacian pyramid tensors, Data types supported at each level: S16. |
[in] | input | Source tensor. Data types supported: S16. |
[out] | output | Output tensor. Data types supported: U8. |
[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 46 of file CLLaplacianReconstruct.cpp.
References CLKernelLibrary::get().
void configure | ( | const CLCompileContext & | compile_context, |
const CLPyramid * | pyramid, | ||
ICLTensor * | input, | ||
ICLTensor * | output, | ||
BorderMode | border_mode, | ||
uint8_t | constant_border_value | ||
) |
Initialise the function's source, destinations and border mode.
The Output image must have the same size as the first level of the pyramid. The Input image must have the same size as the last level of the pyramid.
The idea is to reconstuct the original hi-res image from a low-res representation of it and the laplacian pyramid.
[in] | compile_context | The compile context to be used. |
[in] | pyramid | Laplacian pyramid tensors, Data types supported at each level: S16. |
[in] | input | Source tensor. Data types supported: S16. |
[out] | output | Output tensor. Data types supported: U8. |
[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 51 of file CLLaplacianReconstruct.cpp.
References CLPyramid::allocate(), ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, CLDepthConvertLayer::configure(), ITensorInfo::dimension(), TensorInfo::dimension(), CLPyramid::get_pyramid_level(), ITensor::info(), CLPyramid::info(), CLTensor::info(), arm_compute::test::validation::info, CLPyramid::init(), PyramidInfo::init(), arm_compute::NEAREST_NEIGHBOR, ITensorInfo::num_dimensions(), TensorInfo::num_dimensions(), PyramidInfo::num_levels(), arm_compute::S16, arm_compute::SATURATE, ITensorInfo::tensor_shape(), and arm_compute::U8.
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 92 of file CLLaplacianReconstruct.cpp.
References ARM_COMPUTE_ERROR_ON_MSG, CLPyramid::info(), PyramidInfo::num_levels(), and ICLSimpleFunction::run().