40 : _memory_group(
std::move(memory_manager)), _gradient(), _orient_bin(), _block_norm(), _mag(), _phase(), _hog_space()
53 const size_t num_bins = hog_info->
num_bins();
58 const size_t num_cells_x = width / cell_size.
width;
59 const size_t num_cells_y = height / cell_size.
height;
80 _memory_group.
manage(&_mag);
81 _memory_group.
manage(&_phase);
84 _gradient.
configure(input, &_mag, &_phase, hog_info->
phase_type(), border_mode, constant_border_value);
87 _memory_group.
manage(&_hog_space);
90 _orient_bin = std::make_unique<NEHOGOrientationBinningKernel>();
91 _orient_bin->configure(&_mag, &_phase, &_hog_space, hog->
info());
94 _block_norm = std::make_unique<NEHOGBlockNormalizationKernel>();
95 _block_norm->configure(&_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.
void init(const TensorAllocator &allocator, const Coordinates &coords, TensorInfo &sub_info)
Shares the same backing memory with another tensor allocator, while the tensor info might be differen...
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.
NEHOGDescriptor(std::shared_ptr< IMemoryManager > memory_manager=nullptr)
Default constructor.
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.
PhaseType phase_type() const
The type of PhaseType.
Interface for Neon tensor.
Copyright (c) 2017-2021 Arm Limited.
size_t height
Height of the image region or rectangle.
void run() override
Run the kernels contained in the function.
TensorAllocator * allocator()
Return a pointer to the tensor's allocator.
void configure(ITensor *input, ITensor *output_magnitude, ITensor *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.
void manage(IMemoryManageable *obj) override
Sets a object to be managed by the given memory group.
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.
void allocate() override
Allocate size specified by TensorInfo of CPU memory.
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
#define ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
Memory group resources scope handling class.
virtual void schedule(ICPPKernel *kernel, const Hints &hints)=0
Runs the kernel in the same thread as the caller synchronously.
size_t width
Width of the image region or rectangle.
~NEHOGDescriptor()
Default destructor.
Class for specifying the size of an image or rectangle.
void run() override
Run the kernels contained in the function.
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.
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 configure(ITensor *input, ITensor *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.
static IScheduler & get()
Access the scheduler singleton.