DriveWorks SDK Reference
4.0.0 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 
45 #ifndef DW_IMAGEPROCESSING_COLOR_CORRECTION_H_
46 #define DW_IMAGEPROCESSING_COLOR_CORRECTION_H_
47 
48 #include <dw/core/base/Exports.h>
49 #include <dw/core/base/Types.h>
50 #include <dw/core/base/Status.h>
52 #include <dw/image/Image.h>
53 #include <dw/rig/Rig.h>
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
61 typedef struct dwColorCorrectObject* dwColorCorrectHandle_t;
62 
67 {
69  uint32_t cameraWidth;
70 
72  uint32_t cameraHeight;
73 
76  uint32_t projectionWidth;
77 
80  uint32_t projectionHeight;
81 
83 
105 dwStatus dwColorCorrect_initializeFromRig(dwColorCorrectHandle_t* obj,
106  const dwColorCorrectParameters* parameters,
107  dwRigHandle_t rigConfig,
108  dwContextHandle_t ctx);
109 
137  const uint32_t cameraCount, const dwVector2f* pProjToGroundMap,
138  const dwColorCorrectParameters* params);
150 dwStatus dwColorCorrect_release(dwColorCorrectHandle_t obj);
151 
162 dwStatus dwColorCorrect_reset(dwColorCorrectHandle_t obj);
163 
176 dwStatus dwColorCorrect_setCUDAStream(cudaStream_t stream,
177  dwColorCorrectHandle_t obj);
178 
191 dwStatus dwColorCorrect_getCUDAStream(cudaStream_t* stream,
192  dwColorCorrectHandle_t obj);
193 
215  uint32_t cameraIdx,
216  dwColorCorrectHandle_t obj);
217 
246  uint32_t curCameraIdx,
247  float32_t factor,
248  dwColorCorrectHandle_t obj);
249 
250 #ifdef __cplusplus
251 }
252 #endif
253 
254 #endif // DW_IMAGEPROCESSING_COLOR_CORRECTION_H_
NVIDIA DriveWorks API: Core Types
Configuration parameters of the color correction module.
uint32_t cameraHeight
Height of the images from camera to be corrected. Must be even.
float float32_t
Specifies POD types.
Definition: Types.h:70
NVIDIA DriveWorks API: Rig Configuration
struct dwImageObject * dwImageHandle_t
Definition: Image.h:100
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: 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.
DW_API_PUBLIC dwStatus dwColorCorrect_reset(dwColorCorrectHandle_t obj)
This method resets all resources associated with a color_correct object.
dwStatus
Status definition.
Definition: Status.h:180
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:79
NVIDIA DriveWorks API: Core Methods
uint32_t cameraWidth
Width of the images from camera to be corrected. Must be even.
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:54
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 Rig interface.
Definition: Rig.h:70
struct dwColorCorrectObject * dwColorCorrectHandle_t
Handles representing the Color Correction interface.
NVIDIA DriveWorks API: Core Exports