DriveWorks SDK Reference
5.14.77 Release
For Test and Development only

DataConditioner.h
Go to the documentation of this file.
1
2//
3// Notice
4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8//
9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10// information or for any infringement of patents or other rights of third parties that may
11// result from its use. No license is granted by implication or otherwise under any patent
12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13// expressly authorized by NVIDIA. Details are subject to change without notice.
14// This code supersedes and replaces all information previously supplied.
15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16// components in life support devices or systems without express written approval of
17// NVIDIA CORPORATION & AFFILIATES.
18//
19// SPDX-FileCopyrightText: Copyright (c) 2015-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21//
22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23// property and proprietary rights in and to this material, related
24// documentation and any modifications thereto. Any use, reproduction,
25// disclosure or distribution of this material and related documentation
26// without an express license agreement from NVIDIA CORPORATION or
27// its affiliates is strictly prohibited.
28//
30
46#ifndef DW_DNN_DATACONDITIONER_H_
47#define DW_DNN_DATACONDITIONER_H_
48
50#include <dw/core/base/Types.h>
51#include <dw/image/Image.h>
53
54#ifdef __cplusplus
55extern "C" {
56#endif
58{
87
91typedef struct dwDataConditionerObject* dwDataConditionerHandle_t;
92
103
124 dwBlobSize const* const networkInputBlobSize,
125 uint32_t const maxNumImages,
126 dwDataConditionerParams const* const dataConditionerParams,
127 cudaStream_t const stream, dwContextHandle_t const ctx);
128
152 dwDNNTensorProperties const* const outputProperties,
153 uint32_t const maxNumImages,
154 dwDataConditionerParams const* const dataConditionerParams,
155 cudaStream_t const stream, dwContextHandle_t const ctx);
156
170
182
193
206
234dwStatus dwDataConditioner_prepareDataRaw(float32_t* const dOutputImage, dwImageCUDA const* const* const inputImages,
235 uint32_t const numImages, dwRect const* const roi,
236 cudaTextureAddressMode const addressMode, dwDataConditionerHandle_t const obj);
237
266 dwImageHandle_t const* const inputImages,
267 uint32_t const numImages, dwRect const* const rois,
268 cudaTextureAddressMode const addressMode, dwDataConditionerHandle_t const obj);
269
281 dwDataConditionerHandle_t const obj);
282
298 float32_t const inputX, float32_t const inputY,
299 dwRect const* const roi, dwDataConditionerHandle_t const obj);
300#ifdef __cplusplus
301}
302#endif
304#endif // DW_DNN_DATACONDITIONER_H_
NVIDIA DriveWorks API: Core Methods
enum cudaTextureAddressMode cudaTextureAddressMode
Definition: Context.h:67
dwStatus
Status definition.
Definition: ErrorDefs.h:45
NVIDIA DriveWorks API: DNNTensor Structures and Methods
NVIDIA DriveWorks API: Core Types
float float32_t
Specifies POD types.
Definition: BasicTypes.h:59
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:86
#define DW_API_PUBLIC
Definition: Exports.h:54
Holds blob dimensions.
Definition: TypesExtra.h:207
bool ignoreAspectRatio
Boolean indicating whether the aspect ratio of the input image should be kept (false) or the image sh...
bool splitPlanes
Boolean indicating whether planes should be split. Default is true.
float32_t meanValue[DW_MAX_IMAGE_PLANES]
Mean value to be subtracted. Range [0, 255]. Default is 0.
const dwImageCUDA * meanImage
Mean image to be subtracted.
bool doPerPlaneMeanNormalization
Boolean indicating whether to perform per-plane mean normalization. Default false.
uint32_t channelIdx[DW_MAX_IMAGE_PLANES]
Index of each channel determining the channel order. channelIdx[x] = y means that the calculation on ...
float32_t scaleCoefficient
Scale pixel intensities. Default is 1.0.
float32_t stdev[DW_MAX_IMAGE_PLANES]
Standard deviation with range [0, 255].
DW_API_PUBLIC dwStatus dwDataConditioner_setCUDAStream(cudaStream_t const stream, dwDataConditionerHandle_t const obj)
Sets the CUDA stream for CUDA related operations.
DW_API_PUBLIC dwStatus dwDataConditioner_initialize(dwDataConditionerHandle_t *const obj, dwBlobSize const *const networkInputBlobSize, uint32_t const maxNumImages, dwDataConditionerParams const *const dataConditionerParams, cudaStream_t const stream, dwContextHandle_t const ctx)
Initializes a DataConditioner module.
DW_API_PUBLIC dwStatus dwDataConditioner_getCUDAStream(cudaStream_t *const stream, dwDataConditionerHandle_t const obj)
Gets the CUDA stream used by the data conditioner.
DW_API_PUBLIC dwStatus dwDataConditioner_release(dwDataConditionerHandle_t const obj)
Releases the DataConditioner module.
DW_API_PUBLIC dwStatus dwDataConditioner_initParams(dwDataConditionerParams *const dataConditionerParams)
Initializes DataConditioner parameters with default values.
DW_API_PUBLIC dwStatus dwDataConditioner_prepareDataRaw(float32_t *const dOutputImage, dwImageCUDA const *const *const inputImages, uint32_t const numImages, dwRect const *const roi, cudaTextureAddressMode const addressMode, dwDataConditionerHandle_t const obj)
Runs the configured transformations on an image.
struct dwDataConditionerObject * dwDataConditionerHandle_t
Handle to a DataConditioner.
DW_API_PUBLIC dwStatus dwDataConditioner_getOutputSize(dwBlobSize *const outputBlobSize, dwDataConditionerHandle_t const obj)
Computes the output size based on the input size and the operations that have been added.
DW_API_PUBLIC dwStatus dwDataConditioner_reset(dwDataConditionerHandle_t const obj)
Resets the DataConditioner module.
DW_API_PUBLIC dwStatus dwDataConditioner_outputPositionToInput(float32_t *const outputX, float32_t *const outputY, float32_t const inputX, float32_t const inputY, dwRect const *const roi, dwDataConditionerHandle_t const obj)
Computes the position of a point from the interpreted DNN output on the input image.
DW_API_PUBLIC dwStatus dwDataConditioner_prepareData(dwDNNTensorHandle_t const tensorOutput, dwImageHandle_t const *const inputImages, uint32_t const numImages, dwRect const *const rois, cudaTextureAddressMode const addressMode, dwDataConditionerHandle_t const obj)
Runs the configured transformations on an image.
DW_API_PUBLIC dwStatus dwDataConditioner_initializeFromTensorProperties(dwDataConditionerHandle_t *const obj, dwDNNTensorProperties const *const outputProperties, uint32_t const maxNumImages, dwDataConditionerParams const *const dataConditionerParams, cudaStream_t const stream, dwContextHandle_t const ctx)
Initializes a DataConditioner module.
struct dwDNNTensorObject * dwDNNTensorHandle_t
Handles representing Deep Neural Network interface.
Definition: Tensor.h:57
Specifies DNNTensor properties.
Definition: Tensor.h:99
struct dwImageObject * dwImageHandle_t
Definition: Image.h:110
#define DW_MAX_IMAGE_PLANES
Definition: Image.h:94
Defines a CUDA image.
Definition: Image.h:516
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
Defines a rectangle.