Extracts Histogram of Oriented Gradients features from input image.
More...
|
VPIStatus | vpiCreateExtractHOGFeatures (uint64_t backends, int32_t width, int32_t height, int32_t features, int32_t cellSize, int32_t numOrientations, int32_t *outNumFeatures, VPIPayload *payload) |
| Create a payload for the non-batch version of HOG algorithm. More...
|
|
VPIStatus | vpiCreateExtractHOGFeaturesBatch (uint64_t backends, int32_t maxBatchWidth, int32_t maxBatchHeight, int32_t imgWidth, int32_t imgHeight, int32_t features, int32_t cellSize, int32_t numOrientations, int32_t *outNumFeatures, VPIPayload *payload) |
| Create a payload for the batch version of HOG algorithm. More...
|
|
VPIStatus | vpiSubmitExtractHOGFeatures (VPIStream stream, uint64_t backend, VPIPayload payload, VPIImage input, VPIImage *outFeatures, int32_t numFeatures) |
| Submits a HOG operation to the stream. More...
|
|
Extracts Histogram of Oriented Gradients features from input image.
◆ vpiCreateExtractHOGFeatures()
VPIStatus vpiCreateExtractHOGFeatures |
( |
uint64_t |
backends, |
|
|
int32_t |
width, |
|
|
int32_t |
height, |
|
|
int32_t |
features, |
|
|
int32_t |
cellSize, |
|
|
int32_t |
numOrientations, |
|
|
int32_t * |
outNumFeatures, |
|
|
VPIPayload * |
payload |
|
) |
| |
#include </opt/nvidia/vpi2/include/vpi/experimental/HOG.h>
Create a payload for the non-batch version of HOG algorithm.
- Parameters
-
[in] | backends | VPI backends that are eligible to execute the algorithm.
|
[in] | width,height | Dimensions of the input image to be used.
|
[in] | features | Flags to specify what features will be returned.
- Must be a bitwise combination of one or more of the following flags:
|
[in] | cellSize | Cell size, typically 8 or 16 for 8x8 and 16x16 cells respectively.
- Must be >=2 and <= 32 and power of two.
|
[in] | numOrientations | Number of orientations used. This is typically 18.
- Must be between 4 and 18.
|
[out] | outNumFeatures | Receives the number of features that will be returned. Pass NULL if not needed. |
[out] | payload | Pointer to the payload variable that receives the created handle. |
- Return values
-
◆ vpiCreateExtractHOGFeaturesBatch()
VPIStatus vpiCreateExtractHOGFeaturesBatch |
( |
uint64_t |
backends, |
|
|
int32_t |
maxBatchWidth, |
|
|
int32_t |
maxBatchHeight, |
|
|
int32_t |
imgWidth, |
|
|
int32_t |
imgHeight, |
|
|
int32_t |
features, |
|
|
int32_t |
cellSize, |
|
|
int32_t |
numOrientations, |
|
|
int32_t * |
outNumFeatures, |
|
|
VPIPayload * |
payload |
|
) |
| |
#include </opt/nvidia/vpi2/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.
- Parameters
-
[in] | backends | VPI backends that are eligible to execute the algorithm.
|
[in] | maxBatchWidth,maxBatchHeight | Maximum number of images horizontally and vertically, respectively.
|
[in] | imgWidth,imgHeight | Dimensions each of the batch images.
- Must be >= 0.
imgWidth and imgHeight must be multiple of cell width and height respectively.
|
[in] | features | Flags to specify which features will be returned.
- Must be a bitwise combination of one or more of the following flags:
|
[in] | cellSize | Cell size, typically 8 or 16 for 8x8 and 16x16 cells respectively.
- Must be >=2 and <= 32 and power of two.
|
[in] | numOrientations | Number of orientations used. This is typically 18.
- Must be between 4 and 18.
|
[out] | outNumFeatures | Receives the number of features that will be returned. Pass NULL if not needed. |
[out] | payload | Pointer to a payload handle that will receive the allocated payload. |
- Return values
-
◆ vpiSubmitExtractHOGFeatures()
#include </opt/nvidia/vpi2/include/vpi/experimental/HOG.h>
Submits a HOG operation to the stream.
It handles both batch and non-batch payloads.
- Parameters
-
[in] | stream | The stream where the operation will be queued in.
- Must not be NULL.
- Stream must have enabled the backends that will execute the algorithm.
|
[in] | backend | Backend that will execute the algorithm. Must be the backend specified during payload creation or 0 as a shorthand to use this backend. |
[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.
- Must not be NULL.
- 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 ).
- Image must have enabled the backends that will execute the algorithm.
|
[out] | outFeatures | Pointer to an array of images that will receive the features.
- Must not be NULL.
- 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.
- All images must have same format.
- All image must have enabled the backends that will execute the algorithm.
|
[in] | numFeatures | Number of images in the output array. Must be between 1 and 32. |
- Return values
-