DriveWorks SDK Reference
3.0.4260 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 
48 #ifndef DW_IMAGEPROCESSING_IMAGEFILTER_H_
49 #define DW_IMAGEPROCESSING_IMAGEFILTER_H_
50 
51 #include <dw/core/Config.h>
52 #include <dw/core/Context.h>
53 #include <dw/core/Exports.h>
54 #include <dw/core/Types.h>
55 #include <dw/image/Image.h>
56 
57 #include <stdint.h>
58 
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 
63 typedef struct dwImageFilterObject* dwImageFilterHandle_t;
64 
65 typedef enum dwImageFilterType {
67 
71 
75 
81 
82 typedef struct dwImageFilterConfig
83 {
86 
92 
97 
99  uint32_t imageWidth;
100 
102  uint32_t imageHeight;
103 
105  uint32_t kernelWidth;
106 
108  uint32_t kernelHeight;
109 
111  uint32_t order;
112 
115 
124 
126  uint32_t kernelLength;
128 
139 dwStatus dwImageFilter_initialize(dwImageFilterHandle_t* filter, const dwImageFilterConfig* config, dwContextHandle_t context);
140 
150 dwStatus dwImageFilter_setCUDAStream(cudaStream_t stream, dwImageFilterHandle_t filter);
151 
161 dwStatus dwImageFilter_getCUDAStream(cudaStream_t* stream, dwImageFilterHandle_t filter);
162 
175 dwStatus dwImageFilter_applyFilter(dwImageHandle_t outputImage, dwImageHandle_t inputImage, dwImageFilterHandle_t filter);
176 
185 dwStatus dwImageFilter_release(dwImageFilterHandle_t filter);
186 
187 #ifdef __cplusplus
188 }
189 #endif
190 
191 #endif // DW_FEATURES_FEATURES_H_
DW_API_PUBLIC dwStatus dwImageFilter_getCUDAStream(cudaStream_t *stream, dwImageFilterHandle_t filter)
Gets the cuda stream used by the APIs of ImageFilter.
NVIDIA DriveWorks API: Core Types
float float32_t
Specifies POD types.
Definition: Types.h:70
struct dwImageObject * dwImageHandle_t
Definition: Image.h:99
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:123
dwImageFilterType
Definition: ImageFilter.h:65
uint32_t kernelLength
Indicates the kernel data lenght defined by user.
Definition: ImageFilter.h:126
NVIDIA DriveWorks API: Core Methods
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
Zero order recursive gaussian filter.
Definition: ImageFilter.h:70
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:166
dwImageFilterType filterType
Filtering algorithm defined by dwImageFilterType
Definition: ImageFilter.h:85
dwProcessorType
Processor type definitions.
Definition: Types.h:159
float32_t sigma
The sigma of kernel for GAUSSIAN filter.
Definition: ImageFilter.h:114
struct dwImageFilterObject * dwImageFilterHandle_t
Definition: ImageFilter.h:63
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:96
uint32_t order
The order of GAUSSIAN filter.
Definition: ImageFilter.h:111
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
uint32_t imageWidth
Width of the images that the ImageFilter runs on.
Definition: ImageFilter.h:99
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:91
NVIDIA DriveWorks API: Core Exports
uint32_t imageHeight
Height of the images that the ImageFilter runs on.
Definition: ImageFilter.h:102
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:105
#define DW_API_PUBLIC
Definition: Exports.h:56
uint32_t kernelHeight
Height of filter kernel.
Definition: ImageFilter.h:108