DriveWorks SDK Reference
3.5.78 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 
48 #ifndef DW_IMAGEPROCESSING_MOTION_DENSEOPTICALFLOW_H_
49 #define DW_IMAGEPROCESSING_MOTION_DENSEOPTICALFLOW_H_
50 
51 #include <dw/core/Context.h>
52 #include <dw/image/Image.h>
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
61 typedef struct dwDenseOpticalFlowObject* dwDenseOpticalFlowHandle_t;
62 
63 typedef enum {
71 
73 typedef struct
74 {
84  uint32_t imageWidth;
86  uint32_t imageHeight;
88 
98 
109 dwStatus dwDenseOpticalFlow_initialize(dwDenseOpticalFlowHandle_t* obj,
110  const dwDenseOpticalFlowParams* params,
111  dwContextHandle_t ctx);
112 
121 dwStatus dwDenseOpticalFlow_reset(dwDenseOpticalFlowHandle_t obj);
122 
133 dwStatus dwDenseOpticalFlow_release(dwDenseOpticalFlowHandle_t obj);
134 
146 dwStatus dwDenseOpticalFlow_setCUDAStream(cudaStream_t stream, dwDenseOpticalFlowHandle_t obj);
147 
157 dwStatus dwDenseOpticalFlow_getCUDAStream(cudaStream_t* stream, dwDenseOpticalFlowHandle_t obj);
158 
169  dwDenseOpticalFlowHandle_t obj);
170 
187  const dwImageHandle_t input,
188  const dwImageHandle_t inputReference,
189  dwDenseOpticalFlowHandle_t obj);
190 
191 #ifdef __cplusplus
192 }
193 #endif
194 
195 #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:99
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: Core Methods
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:178
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:80
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:56
Defines the properties of the image.
Definition: Image.h:236
High performance with lower quality.