DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

ImageFilter.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-2020 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_IMAGEFILTER_H_
47 #define DW_IMAGEPROCESSING_IMAGEFILTER_H_
48 
49 #include <dw/core/Config.h>
51 #include <dw/core/base/Exports.h>
52 #include <dw/core/base/Types.h>
53 #include <dw/image/Image.h>
54 
55 #include <stdint.h>
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 typedef struct dwImageFilterObject* dwImageFilterHandle_t;
62 
63 typedef enum dwImageFilterType {
65 
69 
73 
79 
80 typedef struct dwImageFilterConfig
81 {
84 
90 
95 
97  uint32_t imageWidth;
98 
100  uint32_t imageHeight;
101 
103  uint32_t kernelWidth;
104 
106  uint32_t kernelHeight;
107 
109  uint32_t order;
110 
113 
122 
124  uint32_t kernelLength;
126 
137 dwStatus dwImageFilter_initialize(dwImageFilterHandle_t* filter, const dwImageFilterConfig* config, dwContextHandle_t context);
138 
148 dwStatus dwImageFilter_setCUDAStream(cudaStream_t stream, dwImageFilterHandle_t filter);
149 
159 dwStatus dwImageFilter_getCUDAStream(cudaStream_t* stream, dwImageFilterHandle_t filter);
160 
173 dwStatus dwImageFilter_applyFilter(dwImageHandle_t outputImage, dwImageHandle_t inputImage, dwImageFilterHandle_t filter);
174 
183 dwStatus dwImageFilter_release(dwImageFilterHandle_t filter);
184 
185 #ifdef __cplusplus
186 }
187 #endif
188 
189 #endif // DW_FEATURES_FEATURES_H_
NVIDIA DriveWorks API: Core Types
DW_API_PUBLIC dwStatus dwImageFilter_getCUDAStream(cudaStream_t *stream, dwImageFilterHandle_t filter)
Gets the cuda stream used by the APIs of ImageFilter.
float float32_t
Specifies POD types.
Definition: Types.h:70
struct dwImageObject * dwImageHandle_t
Definition: Image.h:100
dwTrivialDataType
Specifies a type indicator of the underlying trivial data type.
Definition: Types.h:103
const float32_t * kernel
Filter kernel data defined by user.
Definition: ImageFilter.h:121
dwImageFilterType
Definition: ImageFilter.h:63
uint32_t kernelLength
Indicates the kernel data lenght defined by user.
Definition: ImageFilter.h:124
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
Zero order recursive gaussian filter.
Definition: ImageFilter.h:68
DW_API_PUBLIC dwStatus dwImageFilter_initialize(dwImageFilterHandle_t *filter, const dwImageFilterConfig *config, dwContextHandle_t context)
Allocates resources for an image filter of a certain type, expecting an image of a specific size...
DW_API_PUBLIC dwStatus dwImageFilter_applyFilter(dwImageHandle_t outputImage, dwImageHandle_t inputImage, dwImageFilterHandle_t filter)
Applies the set filter to the input image.
dwStatus
Status definition.
Definition: Status.h:180
dwImageFilterType filterType
Filtering algorithm defined by dwImageFilterType
Definition: ImageFilter.h:83
dwProcessorType
Processor type definitions.
Definition: Types.h:159
float32_t sigma
The sigma of kernel for GAUSSIAN filter.
Definition: ImageFilter.h:112
struct dwImageFilterObject * dwImageFilterHandle_t
Definition: ImageFilter.h:61
DW_API_PUBLIC dwStatus dwImageFilter_release(dwImageFilterHandle_t filter)
Releases the image filter.
dwTrivialDataType pxlType
Pixel type of the images that the ImageFilter runs on.
Definition: ImageFilter.h:94
uint32_t order
The order of GAUSSIAN filter.
Definition: ImageFilter.h:109
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:79
NVIDIA DriveWorks API: Core Methods
uint32_t imageWidth
Width of the images that the ImageFilter runs on.
Definition: ImageFilter.h:97
dwProcessorType processorType
Processorr type set to DW_PROCESSOR_TYPE_PVA_0 or DW_PROCESSOR_TYPE_PVA_1 to run algorithm on PVA...
Definition: ImageFilter.h:89
uint32_t imageHeight
Height of the images that the ImageFilter runs on.
Definition: ImageFilter.h:100
DW_API_PUBLIC dwStatus dwImageFilter_setCUDAStream(cudaStream_t stream, dwImageFilterHandle_t filter)
Sets the cuda stream.
uint32_t kernelWidth
Width of filter kernel.
Definition: ImageFilter.h:103
#define DW_API_PUBLIC
Definition: Exports.h:54
uint32_t kernelHeight
Height of filter kernel.
Definition: ImageFilter.h:106
NVIDIA DriveWorks API: Core Exports