38 : _memory_group(
std::move(memory_manager)),
64 const size_t num_bins = hog_info->
num_bins();
69 const size_t num_cells_x = width / cell_size.
width;
70 const size_t num_cells_y = height / cell_size.
height;
91 _memory_group.
manage(&_mag);
92 _memory_group.
manage(&_phase);
95 _gradient.
configure(compile_context, input, &_mag, &_phase, hog_info->
phase_type(), border_mode, constant_border_value);
98 _memory_group.
manage(&_hog_space);
101 _orient_bin->configure(compile_context, &_mag, &_phase, &_hog_space, hog->
info());
104 _block_norm->configure(compile_context, &_hog_space, output, hog->
info());
BorderMode
Methods available to handle borders.
size_t num_bins() const
The number of histogram bins for each cell.
Interface for HOG data-object.
OpenCL kernel to perform HOG Orientation Binning.
virtual size_t dimension(size_t index) const =0
Return the size of the requested dimension.
const Size2D & cell_size() const
The cell size in pixels.
static CLScheduler & get()
Access the scheduler singleton.
void run() override
Run the kernels contained in the function.
void configure(ICLTensor *input, ICLTensor *output_magnitude, ICLTensor *output_phase, PhaseType phase_type, BorderMode border_mode, uint8_t constant_border_value=0)
Initialise the function's source, destinations, phase type and border mode.
1 channel, 1 U8 per channel
Store the HOG's metadata.
1 channel, 1 F32 per channel
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
CLTensorAllocator * allocator()
Return a pointer to the tensor's allocator.
CLHOGDescriptor(std::shared_ptr< IMemoryManager > memory_manager=nullptr)
Default constructor.
PhaseType phase_type() const
The type of PhaseType.
void init(const TensorInfo &input, size_t alignment=0)
Initialize a tensor based on the passed TensorInfo.
Copyright (c) 2017-2021 Arm Limited.
size_t height
Height of the image region or rectangle.
void manage(IMemoryManageable *obj) override
Sets a object to be managed by the given memory group.
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
OpenCL kernel to perform HOG block normalization.
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
1 channel, 1 S16 per channel
void enqueue(ICLKernel &kernel, bool flush=true)
Schedule the execution of the passed kernel if possible.
#define ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
void allocate() override
Allocate size specified by TensorInfo of OpenCL memory.
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
Memory group resources scope handling class.
Interface for OpenCL tensor.
~CLHOGDescriptor()
Default destructor.
size_t width
Width of the image region or rectangle.
Class for specifying the size of an image or rectangle.
Store the tensor's metadata.
virtual const HOGInfo * info() const =0
Interface to be implemented by the child class to return the HOG's metadata.
void configure(ICLTensor *input, ICLTensor *output, const IHOG *hog, BorderMode border_mode, uint8_t constant_border_value=0)
Initialise the function's source, destination, HOG data-object and border mode.
TensorShape & set(size_t dimension, size_t value, bool apply_dim_correction=true, bool increase_dim_unit=true)
Accessor to set the value of one of the dimensions.
void run() override
Run the kernels contained in the function.