Estimates disparity from a stereo pair. More...
Data Structures | |
struct | VPIStereoDisparityEstimatorCreationParams |
Structure that defines the parameters for vpiCreateStereoDisparityEstimator. More... | |
struct | VPIStereoDisparityEstimatorParams |
Structure that defines the parameters for vpiSubmitStereoDisparityEstimator. More... | |
Functions | |
VPIStatus | vpiInitStereoDisparityEstimatorCreationParams (VPIStereoDisparityEstimatorCreationParams *params) |
Initializes VPIStereoDisparityEstimatorCreationParams with default values. More... | |
VPIStatus | vpiCreateStereoDisparityEstimator (uint64_t backends, int32_t imageWidth, int32_t imageHeight, VPIImageFormat inputFormat, const VPIStereoDisparityEstimatorCreationParams *params, VPIPayload *payload) |
Creates payload for vpiSubmitStereoDisparityEstimator. More... | |
VPIStatus | vpiInitStereoDisparityEstimatorParams (VPIStereoDisparityEstimatorParams *params) |
Initializes VPIStereoDisparityEstimatorParams with default values. More... | |
VPIStatus | vpiSubmitStereoDisparityEstimator (VPIStream stream, uint64_t backend, VPIPayload payload, VPIImage left, VPIImage right, VPIImage disparity, VPIImage confidenceMap, const VPIStereoDisparityEstimatorParams *params) |
Runs stereo processing on a pair of images and outputs a disparity map. More... | |
Estimates disparity from a stereo pair.
Refer to Stereo Disparity Estimator for more details and usage examples.
struct VPIStereoDisparityEstimatorCreationParams |
Structure that defines the parameters for vpiCreateStereoDisparityEstimator.
Definition at line 82 of file StereoDisparity.h.
struct VPIStereoDisparityEstimatorParams |
Structure that defines the parameters for vpiSubmitStereoDisparityEstimator.
Definition at line 183 of file StereoDisparity.h.
VPIStatus vpiCreateStereoDisparityEstimator | ( | uint64_t | backends, |
int32_t | imageWidth, | ||
int32_t | imageHeight, | ||
VPIImageFormat | inputFormat, | ||
const VPIStereoDisparityEstimatorCreationParams * | params, | ||
VPIPayload * | payload | ||
) |
#include </opt/nvidia/vpi2/include/vpi/algo/StereoDisparity.h>
Creates payload for vpiSubmitStereoDisparityEstimator.
[in] | backends | VPI backends that are eligible to execute the algorithm.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[in] | imageWidth,imageHeight | Input image dimensions.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[in] | inputFormat | Input image format.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[in] | params | Creation parameters. Pass NULL to use defaults given by vpiInitStereoDisparityEstimatorCreationParams. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[out] | payload | Pointer to the payload variable that receives the created handle. |
VPI_IMAGE_FORMAT_INVALID | inputFormat is not supported. |
VPI_ERROR_INVALID_ARGUMENT | payload is NULL. |
VPI_ERROR_INVALID_ARGUMENT | imageWidth or imageHeight outside valid range. |
VPI_ERROR_INVALID_ARGUMENT | backends refers to an invalid backend. |
VPI_ERROR_INVALID_ARGUMENT | Maximum disparity in params outside valid range. |
VPI_ERROR_NOT_IMPLEMENTED | Stereo Disparity Estimator algorithm is not supported by given backends. |
VPI_ERROR_INVALID_OPERATION | Backend hardware not available. |
VPI_ERROR_INVALID_CONTEXT | Current context is destroyed. |
VPI_ERROR_OUT_OF_MEMORY | Cannot allocate required resources. |
VPI_ERROR_INVALID_OPERATION | Backend isn't enabled in current context. |
VPI_SUCCESS | Operation executed successfully. |
VPIStatus vpiInitStereoDisparityEstimatorCreationParams | ( | VPIStereoDisparityEstimatorCreationParams * | params | ) |
#include </opt/nvidia/vpi2/include/vpi/algo/StereoDisparity.h>
Initializes VPIStereoDisparityEstimatorCreationParams with default values.
Defaults:
[in] | params | Structure to be filled with default values. |
VPI_ERROR_INVALID_ARGUMENT | params is NULL. |
VPI_SUCCESS | Operation executed successfully. |
VPIStatus vpiInitStereoDisparityEstimatorParams | ( | VPIStereoDisparityEstimatorParams * | params | ) |
#include </opt/nvidia/vpi2/include/vpi/algo/StereoDisparity.h>
Initializes VPIStereoDisparityEstimatorParams with default values.
Defaults:
[in] | params | Structure to be filled with default values. |
VPI_ERROR_INVALID_ARGUMENT | params is NULL. |
VPI_SUCCESS | Operation executed successfully. |
VPIStatus vpiSubmitStereoDisparityEstimator | ( | VPIStream | stream, |
uint64_t | backend, | ||
VPIPayload | payload, | ||
VPIImage | left, | ||
VPIImage | right, | ||
VPIImage | disparity, | ||
VPIImage | confidenceMap, | ||
const VPIStereoDisparityEstimatorParams * | params | ||
) |
#include </opt/nvidia/vpi2/include/vpi/algo/StereoDisparity.h>
Runs stereo processing on a pair of images and outputs a disparity map.
[in] | stream | The stream where the operation will be queued in.
|
[in] | backend | Backend that will execute the algorithm.
|
[in] | payload | Payload to be submitted along the other parameters. |
[in] | left | Left stereo input image.
|
[in] | right | Right stereo input image.
|
[out] | disparity | Image where the disparity values will be written to. Returned values are in Q10.5 format, i.e., signed fixed point with 5 fractional bits. Divide it by 32.0f to convert it to floating point.
|
[out] | confidenceMap | Image containing a confidence score telling how accurate the disparity is. Pass NULL if it isn't needed. Returned confidence range from 0 to 65535. The higher the confidence, more accurate is the corresponding disparity.
|
[in] | params | Pointer to algorithm control parameters. If NULL, it'll use the defaults given by vpiInitStereoDisparityEstimatorParams. |
VPI_ERROR_INVALID_ARGUMENT | stream is NULL. |
VPI_ERROR_INVALID_ARGUMENT | left , right or disparity are NULL. |
VPI_ERROR_INVALID_ARGUMENT | Maximum disparity in params outside valid range. |
VPI_ERROR_INVALID_ARGUMENT | Window size in params outside valid range. |
VPI_ERROR_INVALID_ARGUMENT | left and right images must have the same dimensions. |
VPI_ERROR_INVALID_ARGUMENT | Input image dimensions must be equal to what's configured in payload . |
VPI_ERROR_INVALID_ARGUMENT | confidenceMap and disparity must have same dimensions. |
VPI_ERROR_INVALID_ARGUMENT | Backend doesn't output confidence map. |
VPI_ERROR_INVALID_IMAGE_FORMAT | left and right format don't match payload image format. |
VPI_ERROR_INVALID_IMAGE_FORMAT | disparity format is invalid. |
VPI_ERROR_INVALID_PAYLOAD_TYPE | payload is invalid. |
VPI_ERROR_INVALID_OPERATION | The needed backends aren't enabled in stream , left , right , disparity or confidenceMap . |
VPI_SUCCESS | Operation executed successfully. |