DriveWorks SDK Reference

| 0.6.67 Release

ColorCorrection.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) 2016 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 
43 #ifndef DW_COLOR_CORRECTION_H__
44 #define DW_COLOR_CORRECTION_H__
45 
46 #include <dw/core/Exports.h>
47 #include <dw/core/Types.h>
48 #include <dw/core/Status.h>
49 #include <dw/core/Context.h>
50 #include <dw/image/Image.h>
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
59 typedef struct dwColorCorrectObject *dwColorCorrectHandle_t;
60 
65 {
67  uint32_t cameraWidth;
68 
70  uint32_t cameraHeight;
71 
74  uint32_t projectionWidth;
75 
78  uint32_t projectionHeight;
79 
81 
103 dwStatus dwColorCorrect_initializeFromRig(dwColorCorrectHandle_t *obj,
104  dwContextHandle_t ctx,
105  dwRigConfigurationHandle_t rigConfig,
106  const dwColorCorrectParameters *parameters);
107 
108 
136  const uint32_t cameraCount, const float32_t* pProjToGroundMap,
137  const dwColorCorrectParameters *params);
148 dwStatus dwColorCorrect_release(dwColorCorrectHandle_t *obj);
149 
161 dwStatus dwColorCorrect_setCUDAStream(cudaStream_t stream,
162  dwColorCorrectHandle_t obj);
163 
175 dwStatus dwColorCorrect_getCUDAStream(cudaStream_t *stream,
176  dwColorCorrectHandle_t obj);
177 
198  uint32_t cameraIdx,
199  dwColorCorrectHandle_t obj);
200 
229  uint32_t curCameraIdx,
230  float32_t factor,
231  dwColorCorrectHandle_t obj);
232 
233 
234 #ifdef __cplusplus
235 }
236 #endif
237 
238 #endif // DW_COLOR_CORRECTION_H__
Configuration parameters of the color correction module.
uint32_t cameraHeight
Height of the images from camera to be corrected. Must be even.
NVIDIA DriveWorks API: Rig Configuration
NVIDIA DriveWorks API: Core Types
float float32_t
Specifies POD types.
Definition: Types.h:77
uint32_t projectionHeight
Height of the internally constructed projection image to perform color correction.
Defines a CUDA image.
Definition: Image.h:263
struct dwRigConfigurationObject * dwRigConfigurationHandle_t
Handle representing the Sensor Abstraction Layer interface.
uint32_t projectionWidth
Width of the internally constructed projection image to perform color correction. ...
NVIDIA DriveWorks API: Core Methods
DW_API_PUBLIC dwStatus dwColorCorrect_getCUDAStream(cudaStream_t *stream, dwColorCorrectHandle_t obj)
Returns the CUDA stream on which the calculations of the color correction are executed.
NVIDIA DriveWorks API: Core Exports
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
dwStatus
Status definition.
Definition: Status.h:167
DW_API_PUBLIC dwStatus dwColorCorrect_release(dwColorCorrectHandle_t *obj)
This method releases all resources associated with a color_correct object.
DW_API_PUBLIC dwStatus dwColorCorrect_correctByReferenceView(dwImageCUDA *pImage, uint32_t curCameraIdx, float32_t factor, dwColorCorrectHandle_t obj)
Applies global color correction on the given image.
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:78
uint32_t cameraWidth
Width of the images from camera to be corrected. Must be even.
DW_API_PUBLIC dwStatus dwColorCorrect_initializeFromProjectionMap(dwColorCorrectHandle_t *obj, dwContextHandle_t ctx, const uint32_t cameraCount, const float32_t *pProjToGroundMap, const dwColorCorrectParameters *params)
Creates and initializes the color correction module using the existing reprojection matrix that repro...
DW_API_PUBLIC dwStatus dwColorCorrect_initializeFromRig(dwColorCorrectHandle_t *obj, dwContextHandle_t ctx, dwRigConfigurationHandle_t rigConfig, const dwColorCorrectParameters *parameters)
Creates and initializes the color correction module using dwRigConfiguration.
DW_API_PUBLIC dwStatus dwColorCorrect_setCUDAStream(cudaStream_t stream, dwColorCorrectHandle_t obj)
Sets the CUDA stream to run the required calculations of the color correction.
#define DW_API_PUBLIC
Definition: Exports.h:76
NVIDIA DriveWorks API: Core Status Methods
struct dwColorCorrectObject * dwColorCorrectHandle_t
Handles representing the Color Correction interface.
DW_API_PUBLIC dwStatus dwColorCorrect_setReferenceCameraView(const dwImageCUDA *pReferenceImage, uint32_t cameraIdx, dwColorCorrectHandle_t obj)
This method adds reference view to color correction; the color of all the other views are corrected b...