Defines the Dense Optical Flow module.
◆ dwDenseOpticalFlowParams
struct dwDenseOpticalFlowParams |
Data Fields |
dwDenseOpticalFlowMode |
estimationMode |
Estimation mode that determines the speed and quality of the optical flow. |
uint32_t |
imageHeight |
Input image height. |
uint32_t |
imageWidth |
Input image width. |
dwProcessorType |
processorNVENC |
Indicates which NVENC the corresponding part of the pipeline to be executed. Valid options are DW_PROCESSOR_TYPE_NVENC_0, DW_PROCESSOR_TYPE_NVENC_1
|
dwProcessorType |
processorPVA |
Indicates which PVA the corresponding part of the pipeline to be executed. Valid options are DW_PROCESSOR_TYPE_PVA_0, DW_PROCESSOR_TYPE_PVA_1
|
◆ dwDenseOpticalFlowHandle_t
◆ dwDenseOpticalFlowMode
Enumerator |
---|
DW_DENSE_OPTICAL_FLOW_MODE_HIGH_PERFORMANCE | High performance with lower quality.
|
DW_DENSE_OPTICAL_FLOW_MODE_ULTRA_HIGH_PERFORMANCE | Ultra high performance with lowest quality.
|
DW_DENSE_OPTICAL_FLOW_MODE_HIGH_QUALITY | High quality with low performance.
|
Definition at line 61 of file DenseOpticalFlow.h.
◆ dwDenseOpticalFlow_calculateOpticalFlow()
Calculates Dense Optical Flow between input and inputReference.
- Parameters
-
[out] | output | Image of format DW_IMAGE_FORMAT_RG_INT16 where R channel contains X coordinates and G channel contains Y coordinates of a motion vector for each pixel. Output image is owned by the application. |
[in] | input | Image of format DW_IMAGE_FORMAT_YUV420_UINT8_SEMIPLANAR |
[in] | inputReference | Reference image of format DW_IMAGE_FORMAT_YUV420_UINT8_SEMIPLANAR |
[in] | obj | Specifies the DenseOpticalFlow handle. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
- Note
- output must be created via dwDenseOpticalFlow_createOutputImage.
◆ dwDenseOpticalFlow_getCUDAStream()
Gets the CUDA stream.
- Parameters
-
[out] | stream | The CUDA stream currently used. |
[in] | obj | Specifies the DenseOpticalFlow handle. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
◆ dwDenseOpticalFlow_getOutputImageProperties()
Returns the required output image properties.
- Parameters
-
[out] | outputProperties | Output image properties |
[in] | obj | Specifies the DenseOpticalFlow handle. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
◆ dwDenseOpticalFlow_initDefaultParams()
Initializes DenseOpticalFlow parameters with default values.
- Parameters
-
[out] | params | DenseOpticalFlow parameters. |
- Returns
- DW_SUCCESS, DW_INVALID_ARGUMENT
◆ dwDenseOpticalFlow_initialize()
Initializes Dense Optical Flow module.
- Parameters
-
[out] | obj | A pointer to DenseOpticalFlow handle to be initialized. |
[in] | params | DenseOpticalFlow parameters |
[in] | ctx | Specifies the handle to the context |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT
◆ dwDenseOpticalFlow_release()
Releases the DenseOpticalFlow module.
- Parameters
-
[in] | obj | The object handle to release. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
- Note
- This method renders the handle unusable.
◆ dwDenseOpticalFlow_reset()
Resets DenseOpticalFlow module.
- Parameters
-
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
◆ dwDenseOpticalFlow_setCUDAStream()
Sets the CUDA stream.
- Note
- The ownership of the stream remains by the callee.
- Parameters
-
[in] | stream | The CUDA stream to be used. Default is the stream 0, resulting in synchronous operations. |
[in] | obj | Specifies the DenseOpticalFlow handle. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST