DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

DenseOpticalFlow.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed
3 // under the Mutual Non-Disclosure Agreement.
4 //
5 // Notice
6 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
8 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10 //
11 // NVIDIA Corporation assumes no responsibility for the consequences of use of such
12 // information or for any infringement of patents or other rights of third parties that may
13 // result from its use. No license is granted by implication or otherwise under any patent
14 // or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15 // expressly authorized by NVIDIA. Details are subject to change without notice.
16 // This code supersedes and replaces all information previously supplied.
17 // NVIDIA Corporation products are not authorized for use as critical
18 // components in life support devices or systems without express written approval of
19 // NVIDIA Corporation.
20 //
21 // Copyright (c) 2019 NVIDIA Corporation. All rights reserved.
22 //
23 // NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24 // rights in and to this software and related documentation and any modifications thereto.
25 // Any use, reproduction, disclosure or distribution of this software and related
26 // documentation without an express license agreement from NVIDIA Corporation is
27 // strictly prohibited.
28 //
30 
46 #ifndef DW_IMAGEPROCESSING_MOTION_DENSEOPTICALFLOW_H_
47 #define DW_IMAGEPROCESSING_MOTION_DENSEOPTICALFLOW_H_
48 
50 #include <dw/image/Image.h>
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
59 typedef struct dwDenseOpticalFlowObject* dwDenseOpticalFlowHandle_t;
60 
61 typedef enum {
69 
71 typedef struct
72 {
82  uint32_t imageWidth;
84  uint32_t imageHeight;
86 
96 
107 dwStatus dwDenseOpticalFlow_initialize(dwDenseOpticalFlowHandle_t* obj,
108  const dwDenseOpticalFlowParams* params,
109  dwContextHandle_t ctx);
110 
119 dwStatus dwDenseOpticalFlow_reset(dwDenseOpticalFlowHandle_t obj);
120 
131 dwStatus dwDenseOpticalFlow_release(dwDenseOpticalFlowHandle_t obj);
132 
144 dwStatus dwDenseOpticalFlow_setCUDAStream(cudaStream_t stream, dwDenseOpticalFlowHandle_t obj);
145 
155 dwStatus dwDenseOpticalFlow_getCUDAStream(cudaStream_t* stream, dwDenseOpticalFlowHandle_t obj);
156 
167  dwDenseOpticalFlowHandle_t obj);
168 
185  const dwImageHandle_t input,
186  const dwImageHandle_t inputReference,
187  dwDenseOpticalFlowHandle_t obj);
188 
189 #ifdef __cplusplus
190 }
191 #endif
192 
193 #endif // DW_IMAGEPROCESSING_MOTION_DENSEOPTICALFLOW_H_
struct dwDenseOpticalFlowObject * dwDenseOpticalFlowHandle_t
Handle to a DenseOpticalFlow object.
High quality with low performance.
struct dwImageObject * dwImageHandle_t
Definition: Image.h:100
DW_API_PUBLIC dwStatus dwDenseOpticalFlow_getOutputImageProperties(dwImageProperties *outputProperties, dwDenseOpticalFlowHandle_t obj)
Returns the required output image properties.
Dense Optical Flow parameters.
DW_API_PUBLIC dwStatus dwDenseOpticalFlow_calculateOpticalFlow(dwImageHandle_t output, const dwImageHandle_t input, const dwImageHandle_t inputReference, dwDenseOpticalFlowHandle_t obj)
Calculates Dense Optical Flow between input and inputReference.
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
DW_API_PUBLIC dwStatus dwDenseOpticalFlow_reset(dwDenseOpticalFlowHandle_t obj)
Resets DenseOpticalFlow module.
dwProcessorType processorPVA
Indicates which PVA the corresponding part of the pipeline to be executed.
dwStatus
Status definition.
Definition: Status.h:180
dwProcessorType
Processor type definitions.
Definition: Types.h:159
DW_API_PUBLIC dwStatus dwDenseOpticalFlow_initialize(dwDenseOpticalFlowHandle_t *obj, const dwDenseOpticalFlowParams *params, dwContextHandle_t ctx)
Initializes Dense Optical Flow module.
dwProcessorType processorNVENC
Indicates which NVENC the corresponding part of the pipeline to be executed.
uint32_t imageHeight
Input image height.
DW_API_PUBLIC dwStatus dwDenseOpticalFlow_initDefaultParams(dwDenseOpticalFlowParams *params)
Initializes DenseOpticalFlow parameters with default values.
DW_API_PUBLIC dwStatus dwDenseOpticalFlow_setCUDAStream(cudaStream_t stream, dwDenseOpticalFlowHandle_t obj)
Sets the CUDA stream.
uint32_t imageWidth
Input image width.
Ultra high performance with lowest quality.
dwDenseOpticalFlowMode
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:79
NVIDIA DriveWorks API: Core Methods
dwDenseOpticalFlowMode estimationMode
Estimation mode that determines the speed and quality of the optical flow.
DW_API_PUBLIC dwStatus dwDenseOpticalFlow_release(dwDenseOpticalFlowHandle_t obj)
Releases the DenseOpticalFlow module.
DW_API_PUBLIC dwStatus dwDenseOpticalFlow_getCUDAStream(cudaStream_t *stream, dwDenseOpticalFlowHandle_t obj)
Gets the CUDA stream.
#define DW_API_PUBLIC
Definition: Exports.h:54
Defines the properties of the image.
Definition: Image.h:238
High performance with lower quality.