21.02
|
Store the HOG's metadata. More...
#include <HOGInfo.h>
Public Member Functions | |
HOGInfo () | |
Default constructor. More... | |
virtual | ~HOGInfo ()=default |
Default destructor. More... | |
HOGInfo (const HOGInfo &)=default | |
Allow instances of this class to be copy constructed. More... | |
HOGInfo & | operator= (const HOGInfo &)=default |
Allow instances of this class to be copied. More... | |
HOGInfo (HOGInfo &&)=default | |
Allow instances of this class to be move constructed. More... | |
HOGInfo & | operator= (HOGInfo &&)=default |
Allow instances of this class to be moved. More... | |
HOGInfo (const Size2D &cell_size, const Size2D &block_size, const Size2D &detection_window_size, const Size2D &block_stride, size_t num_bins, HOGNormType normalization_type=HOGNormType::L2HYS_NORM, float l2_hyst_threshold=0.2f, PhaseType phase_type=PhaseType::UNSIGNED) | |
Constructor. More... | |
void | init (const Size2D &cell_size, const Size2D &block_size, const Size2D &detection_window_size, const Size2D &block_stride, size_t num_bins, HOGNormType normalization_type=HOGNormType::L2HYS_NORM, float l2_hyst_threshold=0.2f, PhaseType phase_type=PhaseType::UNSIGNED) |
Initialize the metadata structure with the given parameters. More... | |
const Size2D & | cell_size () const |
The cell size in pixels. More... | |
const Size2D & | block_size () const |
The block size in pixels. More... | |
const Size2D & | detection_window_size () const |
The detection window size in pixels. More... | |
const Size2D & | block_stride () const |
The block stride in pixels. More... | |
size_t | num_bins () const |
The number of histogram bins for each cell. More... | |
HOGNormType | normalization_type () const |
The normalization type. More... | |
float | l2_hyst_threshold () const |
Threshold used for L2HYS_NORM normalization type. More... | |
PhaseType | phase_type () const |
The type of PhaseType. More... | |
size_t | descriptor_size () const |
The size of HOG descriptor. More... | |
Size2D | num_cells_per_block () const |
Calculates the number of cells for each block. More... | |
Size2D | num_cells_per_block_stride () const |
Calculates the number of cells per block stride. More... | |
Size2D | num_block_positions_per_image (const Size2D &image_size) const |
Calculates the number of block positions for the given image size. More... | |
HOGInfo | ( | ) |
Default constructor.
Definition at line 31 of file HOGInfo.cpp.
References arm_compute::L2HYS_NORM, and arm_compute::UNSIGNED.
|
virtualdefault |
Default destructor.
HOGInfo | ( | const Size2D & | cell_size, |
const Size2D & | block_size, | ||
const Size2D & | detection_window_size, | ||
const Size2D & | block_stride, | ||
size_t | num_bins, | ||
HOGNormType | normalization_type = HOGNormType::L2HYS_NORM , |
||
float | l2_hyst_threshold = 0.2f , |
||
PhaseType | phase_type = PhaseType::UNSIGNED |
||
) |
Constructor.
[in] | cell_size | Cell size in pixels |
[in] | block_size | Block size in pixels. Must be a multiple of cell_size. |
[in] | detection_window_size | Detection window size in pixels. Must be a multiple of block_size and block_stride. |
[in] | block_stride | Distance in pixels between 2 consecutive blocks along the x and y direction. Must be a multiple of cell size |
[in] | num_bins | Number of histogram bins for each cell |
[in] | normalization_type | (Optional) Normalization type to use for each block |
[in] | l2_hyst_threshold | (Optional) Threshold used for L2HYS_NORM normalization method |
[in] | phase_type | (Optional) Type of PhaseType |
Definition at line 37 of file HOGInfo.cpp.
References HOGInfo::init().
const Size2D & block_size | ( | ) | const |
The block size in pixels.
Definition at line 96 of file HOGInfo.cpp.
Referenced by NEHOGDetectorKernel::configure(), CLHOGDetectorKernel::configure(), NEHOGMultiDetection::configure(), CLHOGBlockNormalizationKernel::configure(), CLHOGMultiDetection::configure(), NEHOGBlockNormalizationKernel::configure(), arm_compute::test::validation::reference::hog_block_normalization(), HOGInfo::init(), and arm_compute::operator<<().
const Size2D & block_stride | ( | ) | const |
The block stride in pixels.
The block stride is the distance between 2 consecutive blocks
Definition at line 106 of file HOGInfo.cpp.
Referenced by NEHOGDetectorKernel::configure(), CLHOGDetectorKernel::configure(), NEHOGMultiDetection::configure(), CLHOGBlockNormalizationKernel::configure(), CLHOGMultiDetection::configure(), NEHOGBlockNormalizationKernel::configure(), arm_compute::test::validation::reference::hog_block_normalization(), arm_compute::test::validation::reference::hog_detector(), HOGInfo::init(), and arm_compute::operator<<().
const Size2D & cell_size | ( | ) | const |
The cell size in pixels.
Definition at line 91 of file HOGInfo.cpp.
Referenced by NEHOGOrientationBinningKernel::configure(), CLHOGOrientationBinningKernel::configure(), NEHOGDescriptor::configure(), CLHOGDescriptor::configure(), NEHOGMultiDetection::configure(), CLHOGBlockNormalizationKernel::configure(), CLHOGMultiDetection::configure(), NEHOGBlockNormalizationKernel::configure(), arm_compute::test::validation::reference::hog_block_normalization(), arm_compute::test::validation::reference::hog_descriptor(), arm_compute::test::validation::reference::hog_orientation_binning(), HOGInfo::init(), and arm_compute::operator<<().
size_t descriptor_size | ( | ) | const |
The size of HOG descriptor.
Definition at line 131 of file HOGInfo.cpp.
Referenced by NEHOGDetectorKernel::configure(), CLHOGDetectorKernel::configure(), arm_compute::test::validation::reference::hog_detector(), and HOG::init().
const Size2D & detection_window_size | ( | ) | const |
The detection window size in pixels.
Definition at line 101 of file HOGInfo.cpp.
Referenced by NEHOGDetectorKernel::configure(), CLHOGDetectorKernel::configure(), arm_compute::test::validation::reference::hog_detector(), HOGInfo::init(), and arm_compute::operator<<().
void init | ( | const Size2D & | cell_size, |
const Size2D & | block_size, | ||
const Size2D & | detection_window_size, | ||
const Size2D & | block_stride, | ||
size_t | num_bins, | ||
HOGNormType | normalization_type = HOGNormType::L2HYS_NORM , |
||
float | l2_hyst_threshold = 0.2f , |
||
PhaseType | phase_type = PhaseType::UNSIGNED |
||
) |
Initialize the metadata structure with the given parameters.
[in] | cell_size | Cell size in pixels |
[in] | block_size | Block size in pixels. Must be a multiple of cell_size. |
[in] | detection_window_size | Detection window size in pixels. Must be a multiple of block_size and block_stride. |
[in] | block_stride | Distance in pixels between 2 consecutive blocks along the x and y direction. Must be a multiple of cell size |
[in] | num_bins | Number of histogram bins for each cell |
[in] | normalization_type | (Optional) Normalization type to use for each block |
[in] | l2_hyst_threshold | (Optional) Threshold used for L2HYS_NORM normalization method |
[in] | phase_type | (Optional) Type of PhaseType |
Definition at line 44 of file HOGInfo.cpp.
References Size2D::area(), ARM_COMPUTE_ERROR_ON_MSG, HOGInfo::block_size(), HOGInfo::block_stride(), HOGInfo::cell_size(), HOGInfo::detection_window_size(), Size2D::height, HOGInfo::l2_hyst_threshold(), HOGInfo::normalization_type(), HOGInfo::num_bins(), HOGInfo::num_block_positions_per_image(), HOGInfo::num_cells_per_block(), HOGInfo::phase_type(), and Size2D::width.
Referenced by HOGInfo::HOGInfo().
float l2_hyst_threshold | ( | ) | const |
Threshold used for L2HYS_NORM normalization type.
Definition at line 121 of file HOGInfo.cpp.
Referenced by CLHOGBlockNormalizationKernel::configure(), NEHOGBlockNormalizationKernel::configure(), arm_compute::error_on_invalid_multi_hog(), HOGInfo::init(), and arm_compute::operator<<().
HOGNormType normalization_type | ( | ) | const |
The normalization type.
Definition at line 116 of file HOGInfo.cpp.
Referenced by CLHOGBlockNormalizationKernel::configure(), NEHOGBlockNormalizationKernel::configure(), arm_compute::error_on_invalid_multi_hog(), HOGInfo::init(), and arm_compute::operator<<().
size_t num_bins | ( | ) | const |
The number of histogram bins for each cell.
Definition at line 111 of file HOGInfo.cpp.
Referenced by NEHOGOrientationBinningKernel::configure(), CLHOGOrientationBinningKernel::configure(), NEHOGDescriptor::configure(), CLHOGDescriptor::configure(), NEHOGMultiDetection::configure(), CLHOGBlockNormalizationKernel::configure(), CLHOGMultiDetection::configure(), NEHOGBlockNormalizationKernel::configure(), arm_compute::test::validation::reference::hog_block_normalization(), arm_compute::test::validation::reference::hog_descriptor(), arm_compute::test::validation::reference::hog_detector(), arm_compute::test::validation::reference::hog_orientation_binning(), HOGInfo::init(), TensorInfo::init(), TensorInfo::init_auto_padding(), and arm_compute::operator<<().
Calculates the number of block positions for the given image size.
[in] | image_size | The input image size data object |
Definition at line 83 of file HOGInfo.cpp.
References ARM_COMPUTE_ERROR_ON, Size2D::height, and Size2D::width.
Referenced by arm_compute::test::validation::reference::hog_detector(), HOGInfo::init(), TensorInfo::init(), and TensorInfo::init_auto_padding().
Size2D num_cells_per_block | ( | ) | const |
Calculates the number of cells for each block.
Definition at line 67 of file HOGInfo.cpp.
References ARM_COMPUTE_ERROR_ON, Size2D::height, and Size2D::width.
Referenced by arm_compute::test::validation::reference::hog_block_normalization(), arm_compute::test::validation::reference::hog_detector(), HOGInfo::init(), TensorInfo::init(), and TensorInfo::init_auto_padding().
Size2D num_cells_per_block_stride | ( | ) | const |
Calculates the number of cells per block stride.
Definition at line 75 of file HOGInfo.cpp.
References ARM_COMPUTE_ERROR_ON, Size2D::height, and Size2D::width.
Referenced by arm_compute::test::validation::reference::hog_block_normalization().
PhaseType phase_type | ( | ) | const |
The type of PhaseType.
Definition at line 126 of file HOGInfo.cpp.
Referenced by NEHOGOrientationBinningKernel::configure(), CLHOGOrientationBinningKernel::configure(), NEHOGDescriptor::configure(), CLHOGDescriptor::configure(), NEHOGMultiDetection::configure(), CLHOGMultiDetection::configure(), arm_compute::error_on_invalid_multi_hog(), arm_compute::test::validation::reference::hog_descriptor(), HOGInfo::init(), and arm_compute::operator<<().