DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

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-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 
47 #ifndef DW_IMAGEPROCESSING_COLOR_CORRECTION_H_
48 #define DW_IMAGEPROCESSING_COLOR_CORRECTION_H_
49 
50 #include <dw/core/Exports.h>
51 #include <dw/core/Types.h>
52 #include <dw/core/Status.h>
53 #include <dw/core/Context.h>
54 #include <dw/image/Image.h>
55 #include <dw/rig/Rig.h>
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
63 typedef struct dwColorCorrectObject* dwColorCorrectHandle_t;
64 
69 {
71  uint32_t cameraWidth;
72 
74  uint32_t cameraHeight;
75 
78  uint32_t projectionWidth;
79 
82  uint32_t projectionHeight;
83 
85 
107 dwStatus dwColorCorrect_initializeFromRig(dwColorCorrectHandle_t* obj,
108  const dwColorCorrectParameters* parameters,
109  dwRigHandle_t rigConfig,
110  dwContextHandle_t ctx);
111 
139  const uint32_t cameraCount, const dwVector2f* pProjToGroundMap,
140  const dwColorCorrectParameters* params);
151 dwStatus dwColorCorrect_release(dwColorCorrectHandle_t obj);
152 
164 dwStatus dwColorCorrect_setCUDAStream(cudaStream_t stream,
165  dwColorCorrectHandle_t obj);
166 
178 dwStatus dwColorCorrect_getCUDAStream(cudaStream_t* stream,
179  dwColorCorrectHandle_t obj);
180 
201  uint32_t cameraIdx,
202  dwColorCorrectHandle_t obj);
203 
232  uint32_t curCameraIdx,
233  float32_t factor,
234  dwColorCorrectHandle_t obj);
235 
236 #ifdef __cplusplus
237 }
238 #endif
239 
240 #endif // DW_IMAGEPROCESSING_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: Core Types
float float32_t
Specifies POD types.
Definition: Types.h:70
NVIDIA DriveWorks API: Rig Configuration
struct dwImageObject * dwImageHandle_t
Definition: Image.h:99
DW_API_PUBLIC dwStatus dwColorCorrect_initializeFromRig(dwColorCorrectHandle_t *obj, const dwColorCorrectParameters *parameters, dwRigHandle_t rigConfig, dwContextHandle_t ctx)
Creates and initializes the color correction module using dwRig.
uint32_t projectionHeight
Height of the internally constructed projection image to perform color correction.
DW_API_PUBLIC dwStatus dwColorCorrect_correctByReferenceView(dwImageHandle_t image, uint32_t curCameraIdx, float32_t factor, dwColorCorrectHandle_t obj)
Applies global color correction on the given image.
Defines a two-element single-precision floating-point vector.
Definition: Types.h:291
DW_API_PUBLIC dwStatus dwColorCorrect_setReferenceCameraView(const dwImageHandle_t referenceImage, uint32_t cameraIdx, dwColorCorrectHandle_t obj)
This method adds reference view to color correction; the color of all the other views are corrected b...
uint32_t projectionWidth
Width of the internally constructed projection image to perform color correction. ...
NVIDIA DriveWorks API: Core Methods
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
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.
dwStatus
Status definition.
Definition: Status.h:166
DW_API_PUBLIC dwStatus dwColorCorrect_release(dwColorCorrectHandle_t obj)
This method releases all resources associated with a color_correct object.
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
uint32_t cameraWidth
Width of the images from camera to be corrected. Must be even.
NVIDIA DriveWorks API: Core Exports
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:56
NVIDIA DriveWorks API: Core Status Methods
DW_API_PUBLIC dwStatus dwColorCorrect_initializeFromProjectionMap(dwColorCorrectHandle_t *obj, dwContextHandle_t ctx, const uint32_t cameraCount, const dwVector2f *pProjToGroundMap, const dwColorCorrectParameters *params)
Creates and initializes the color correction module using the existing reprojection matrix that repro...
struct dwRigObject * dwRigHandle_t
Handle representing the Sensor Abstraction Layer interface.
Definition: Rig.h:179
struct dwColorCorrectObject * dwColorCorrectHandle_t
Handles representing the Color Correction interface.