21.02
|
Basic function to execute optical flow. More...
#include <CLOpticalFlow.h>
Public Member Functions | |
CLOpticalFlow (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Default constructor. More... | |
CLOpticalFlow (const CLOpticalFlow &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLOpticalFlow & | operator= (const CLOpticalFlow &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLOpticalFlow (CLOpticalFlow &&)=default | |
Allow instances of this class to be moved. More... | |
CLOpticalFlow & | operator= (CLOpticalFlow &&)=default |
Allow instances of this class to be moved. More... | |
~CLOpticalFlow () | |
Default destructor. More... | |
void | configure (const CLPyramid *old_pyramid, const CLPyramid *new_pyramid, const ICLKeyPointArray *old_points, const ICLKeyPointArray *new_points_estimates, ICLKeyPointArray *new_points, Termination termination, float epsilon, size_t num_iterations, size_t window_dimension, bool use_initial_estimate, BorderMode border_mode, uint8_t constant_border_value=0) |
Initialise the function input and output. More... | |
void | configure (const CLCompileContext &compile_context, const CLPyramid *old_pyramid, const CLPyramid *new_pyramid, const ICLKeyPointArray *old_points, const ICLKeyPointArray *new_points_estimates, ICLKeyPointArray *new_points, Termination termination, float epsilon, size_t num_iterations, size_t window_dimension, bool use_initial_estimate, BorderMode border_mode, uint8_t constant_border_value=0) |
Initialise the function input and output. 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 optical flow.
This function calls the following OpenCL kernels and functions:
Definition at line 67 of file CLOpticalFlow.h.
CLOpticalFlow | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Default constructor.
Definition at line 40 of file CLOpticalFlow.cpp.
References CLOpticalFlow::~CLOpticalFlow().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
|
default |
Default destructor.
Referenced by CLOpticalFlow::CLOpticalFlow().
void configure | ( | const CLPyramid * | old_pyramid, |
const CLPyramid * | new_pyramid, | ||
const ICLKeyPointArray * | old_points, | ||
const ICLKeyPointArray * | new_points_estimates, | ||
ICLKeyPointArray * | new_points, | ||
Termination | termination, | ||
float | epsilon, | ||
size_t | num_iterations, | ||
size_t | window_dimension, | ||
bool | use_initial_estimate, | ||
BorderMode | border_mode, | ||
uint8_t | constant_border_value = 0 |
||
) |
Initialise the function input and output.
[in] | old_pyramid | Pointer to the pyramid for the old tensor. Data types supported U8 |
[in] | new_pyramid | Pointer to the pyramid for the new tensor. Data types supported U8 |
[in] | old_points | Pointer to the IKeyPointArray storing old key points |
[in] | new_points_estimates | Pointer to the IKeyPointArray storing new estimates key points |
[out] | new_points | Pointer to the IKeyPointArray storing new key points |
[in] | termination | The criteria to terminate the search of each keypoint. |
[in] | epsilon | The error for terminating the algorithm |
[in] | num_iterations | The maximum number of iterations before terminate the alogrithm |
[in] | window_dimension | The size of the window on which to perform the algorithm |
[in] | use_initial_estimate | The flag to indicate whether the initial estimated position should be used |
[in] | border_mode | The border mode applied at scharr kernel stage |
[in] | constant_border_value | (Optional) Constant value to use for borders if border_mode is set to CONSTANT |
Definition at line 62 of file CLOpticalFlow.cpp.
References CLKernelLibrary::get().
void configure | ( | const CLCompileContext & | compile_context, |
const CLPyramid * | old_pyramid, | ||
const CLPyramid * | new_pyramid, | ||
const ICLKeyPointArray * | old_points, | ||
const ICLKeyPointArray * | new_points_estimates, | ||
ICLKeyPointArray * | new_points, | ||
Termination | termination, | ||
float | epsilon, | ||
size_t | num_iterations, | ||
size_t | window_dimension, | ||
bool | use_initial_estimate, | ||
BorderMode | border_mode, | ||
uint8_t | constant_border_value = 0 |
||
) |
Initialise the function input and output.
[in] | compile_context | The compile context to be used. |
[in] | old_pyramid | Pointer to the pyramid for the old tensor. Data types supported U8 |
[in] | new_pyramid | Pointer to the pyramid for the new tensor. Data types supported U8 |
[in] | old_points | Pointer to the IKeyPointArray storing old key points |
[in] | new_points_estimates | Pointer to the IKeyPointArray storing new estimates key points |
[out] | new_points | Pointer to the IKeyPointArray storing new key points |
[in] | termination | The criteria to terminate the search of each keypoint. |
[in] | epsilon | The error for terminating the algorithm |
[in] | num_iterations | The maximum number of iterations before terminate the alogrithm |
[in] | window_dimension | The size of the window on which to perform the algorithm |
[in] | use_initial_estimate | The flag to indicate whether the initial estimated position should be used |
[in] | border_mode | The border mode applied at scharr kernel stage |
[in] | constant_border_value | (Optional) Constant value to use for borders if border_mode is set to CONSTANT |
Definition at line 71 of file CLOpticalFlow.cpp.
References ARM_COMPUTE_ERROR_ON, ITensorInfo::dimension(), arm_compute::quantization::epsilon, CLPyramid::get_pyramid_level(), PyramidInfo::height(), ITensor::info(), CLPyramid::info(), MemoryGroup::manage(), PyramidInfo::num_levels(), IArray< T >::num_values(), IArray< T >::resize(), arm_compute::S16, PyramidInfo::scale(), and PyramidInfo::width().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 162 of file CLOpticalFlow.cpp.
References ARM_COMPUTE_ERROR_ON_MSG, CLScheduler::enqueue(), CLScheduler::get(), and GemmTuner::level.