Extracts Histogram of Oriented Gradients features from input image. More...
Functions | |
VPIStatus | vpiCreateExtractHOGFeatures (VPIBackend backend, uint32_t width, uint32_t height, uint32_t features, uint32_t cellSize, uint32_t numOrientations, VPIPayload *payload, uint32_t *outNumFeatures) |
Create a payload for the non-batch version of HOG algorithm. More... | |
VPIStatus | vpiCreateExtractHOGFeaturesBatch (VPIBackend backend, uint32_t maxBatchWidth, uint32_t maxBatchHeight, uint32_t imgWidth, uint32_t imgHeight, uint32_t features, uint32_t cellSize, uint32_t numOrientations, VPIPayload *payload, uint32_t *outNumFeatures) |
Create a payload for the batch version of HOG algorithm. More... | |
VPIStatus | vpiSubmitExtractHOGFeatures (VPIStream stream, VPIPayload payload, VPIImage input, VPIImage *outFeatures, uint32_t numFeatures) |
Submit the HOG algorithm to the stream associated with the payload. More... | |
HOG flags | |
#define | VPI_HOG_CONTRAST_SENSITIVE 0x01 |
Return contrast sensitive features. | |
#define | VPI_HOG_CONTRAST_INSENSITIVE 0x02 |
Return contrast insensitive features. | |
#define | VPI_HOG_TEXTURE 0x04 |
Return texture-related features. | |
#define | VPI_HOG_ALL_FEATURES (VPI_HOG_CONTRAST_SENSITIVE | VPI_HOG_CONTRAST_INSENSITIVE | VPI_HOG_TEXTURE) |
Helper flag to return all features. | |
Extracts Histogram of Oriented Gradients features from input image.
VPIStatus vpiCreateExtractHOGFeatures | ( | VPIBackend | backend, |
uint32_t | width, | ||
uint32_t | height, | ||
uint32_t | features, | ||
uint32_t | cellSize, | ||
uint32_t | numOrientations, | ||
VPIPayload * | payload, | ||
uint32_t * | outNumFeatures | ||
) |
#include <vpi/experimental/HOG.h>
Create a payload for the non-batch version of HOG algorithm.
[in] | backend | VPI backend where the algorithm will be executed. |
[in] | width,height | Dimensions of the input image to be used. |
[in] | features | Flags to specify what features will be returned |
[in] | cellSize | Cell size, typically 8 or 16 for 8x8 and 16x16 cells respectively. |
[in] | numOrientations | Number of orientations used. This is typically 18. |
[out] | payload | Pointer to memory where the created payload handle will be written to. |
[out] | outNumFeatures | Receives the number of features that will be returned. Pass NULL if not needed. |
VPIStatus vpiCreateExtractHOGFeaturesBatch | ( | VPIBackend | backend, |
uint32_t | maxBatchWidth, | ||
uint32_t | maxBatchHeight, | ||
uint32_t | imgWidth, | ||
uint32_t | imgHeight, | ||
uint32_t | features, | ||
uint32_t | cellSize, | ||
uint32_t | numOrientations, | ||
VPIPayload * | payload, | ||
uint32_t * | outNumFeatures | ||
) |
#include <vpi/experimental/HOG.h>
Create a payload for the batch version of HOG algorithm.
The input images are assumed to be laid out in memory as a 2D matrix of images. All images must have the same dimensions.
[in] | backend | VPI backend where the algorithm will be executed. |
[in] | maxBatchWidth,maxBatchHeight | Maximum number of images horizontally and vertically, respectively. |
[in] | imgWidth,imgHeight | Dimensions each of the batch images. |
[in] | features | Flags to specify which features will be returned |
[in] | cellSize | Cell size, typically 8 or 16 for 8x8 and 16x16 cells respectively. |
[in] | numOrientations | Number of orientations used. This is typically 18. |
[out] | payload | Pointer to a payload handle that will receive the allocated payload. |
[out] | outNumFeatures | Receives the number of features that will be returned. Pass NULL if not needed. |
VPIStatus vpiSubmitExtractHOGFeatures | ( | VPIStream | stream, |
VPIPayload | payload, | ||
VPIImage | input, | ||
VPIImage * | outFeatures, | ||
uint32_t | numFeatures | ||
) |
#include <vpi/experimental/HOG.h>
Submit the HOG algorithm to the stream associated with the payload.
It handles both batch and non-batch payloads.
[in] | stream | The stream where the operation will be queued in. |
[in] | payload | Payload to be submitted along the other parameters. |
[in] | input | If using a non batch payload, this is the input image to be processed. Its dimensions must match what was passed to vpiCreateExtractHOGFeatures. If using a batch payload, the image dimensions must be a multiple of (imgWidth ,imgHeight ), and it must be at most (imgWidth*maxBatchWidth , imgHeight*maxBatchHeight ). |
[out] | outFeatures | Pointer to an array of images that will receive the features. The dimensions of each image must be (input.width / cellSize , input.height / cellSize ). In case of batch processing, the output features position in the 2D matrix be the same position of the corresponding input image. |
[in] | numFeatures | Number of images in the output array. |