Separate foreground and background from video. More...
Data Structures | |
struct | VPIBackgroundSubtractorParams |
Structure that defines the parameters for vpiCreateBackgroundSubtractor. More... | |
Functions | |
VPIStatus | vpiInitBackgroundSubtractorParams (VPIBackgroundSubtractorParams *params) |
Initializes VPIBackgroundSubtractorParams with default values. More... | |
VPIStatus | vpiCreateBackgroundSubtractor (uint32_t backends, int32_t imageWidth, int32_t imageHeight, VPIImageFormat inputFormat, VPIPayload *payload) |
Creates payload for vpiSubmitBackgroundSubtractor. More... | |
VPIStatus | vpiSubmitBackgroundSubtractor (VPIStream stream, uint32_t backend, VPIPayload payload, VPIImage inFrame, VPIImage outFGMask, VPIImage outBGImage, const VPIBackgroundSubtractorParams *params) |
Submits a background subtractor operation to the stream associated with the given payload. More... | |
Separate foreground and background from video.
struct VPIBackgroundSubtractorParams |
Structure that defines the parameters for vpiCreateBackgroundSubtractor.
Definition at line 80 of file BackgroundSubtractor.h.
VPIStatus vpiCreateBackgroundSubtractor | ( | uint32_t | backends, |
int32_t | imageWidth, | ||
int32_t | imageHeight, | ||
VPIImageFormat | inputFormat, | ||
VPIPayload * | payload | ||
) |
#include <vpi/algo/BackgroundSubtractor.h>
Creates payload for vpiSubmitBackgroundSubtractor.
[in] | backends | VPI backends that are eligible to execute the algorithm. Currently only one backend is accepted. |
[in] | imageWidth,imageHeight | Input image dimensions |
[in] | inputFormat | Input image format. |
[out] | payload | Pointer to memory where the created payload handle will be written to. |
VPIStatus vpiInitBackgroundSubtractorParams | ( | VPIBackgroundSubtractorParams * | params | ) |
#include <vpi/algo/BackgroundSubtractor.h>
Initializes VPIBackgroundSubtractorParams with default values.
Defaults:
[in] | params | Structure to be filled with default values. |
VPIStatus vpiSubmitBackgroundSubtractor | ( | VPIStream | stream, |
uint32_t | backend, | ||
VPIPayload | payload, | ||
VPIImage | inFrame, | ||
VPIImage | outFGMask, | ||
VPIImage | outBGImage, | ||
const VPIBackgroundSubtractorParams * | params | ||
) |
#include <vpi/algo/BackgroundSubtractor.h>
Submits a background subtractor operation to the stream associated with the given payload.
Runs background subtractor on the incoming image from the video and outputs a foreground mask. Please refer to Limitations and Constraints for information on limitations for some parameters.
[in] | stream | The stream where the operation will be queued in. |
[in] | backend | Backend that will execute the algorithm. Must be one of the backends specified during payload creation. If 0, VPI will select one of the eligible backends from the payload that accepts the given parameters, usually the fastest one. |
[in] | payload | Payload to be submitted along the other parameters. |
[in] | inFrame | Incoming frame from the video. |
[out] | outFGMask | The output foreground mask as an 8-bit binary image. |
[out] | outBGImage | Background image, can pass nullptr if not needed. |
[in] | params | algorithm control parameters. Pass NULL to use defaults. |