DriveWorks SDK Reference
5.4.5418 Release
For Test and Development only

SoftISP.h
Go to the documentation of this file.
1 //
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-2021 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 
59 #ifndef DW_SOFTISP_H_
60 #define DW_SOFTISP_H_
61 
62 #include <dw/core/Config.h>
64 #include <dw/core/base/Exports.h>
65 #include <dw/core/base/Types.h>
66 #include <dw/image/Image.h>
68 #include <dw/isp/Tonemap.h>
69 #include <stdint.h>
70 
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74 
75 /************************************************************************
76  NOTE THAT THIS API HAS DEPRECATED AND IS NOT PUBLIC ANYMORE, DO NOT USE
77 ************************************************************************/
78 
81 typedef struct dwSoftISPObject* dwSoftISPHandle_t;
82 
89 
90 typedef enum dwSoftISPDenoiseMethod {
96 
97 typedef enum dwSoftISPProcessType {
105 
112 
113 typedef struct dwSoftISPParams
114 {
116  uint32_t width;
117 
119  uint32_t height;
120 
123 
124  // Camera RAW format
126 
127  // Camera Revision number
128  uint32_t cameraRevision;
129 
132 
133  const char* cameraModuleName;
135 
148  const dwCameraProperties* cameraProps);
149 
163 dwStatus dwSoftISP_initialize(dwSoftISPHandle_t* obj,
164  const dwSoftISPParams* params,
165  const dwContextHandle_t ctx);
166 
178 dwStatus dwSoftISP_reset(dwSoftISPHandle_t obj);
179 
195 dwStatus dwSoftISP_release(dwSoftISPHandle_t obj);
196 
210  dwSoftISPHandle_t obj);
211 
226  dwSoftISPHandle_t obj);
227 
245  dwSoftISPHandle_t obj);
246 
264  dwSoftISPHandle_t obj);
265 
289  dwSoftISPHandle_t obj);
290 
306 dwStatus dwSoftISP_bindInputRaw(const dwImageCUDA* rawImage, dwSoftISPHandle_t obj);
307 
320 dwStatus dwSoftISP_processDeviceAsync(dwSoftISPHandle_t obj);
321 
333 dwStatus dwSoftISP_setCUDAStream(cudaStream_t stream, dwSoftISPHandle_t obj);
334 
346 dwStatus dwSoftISP_getCUDAStream(cudaStream_t* stream, dwSoftISPHandle_t obj);
347 
359 dwStatus dwSoftISP_setDemosaicMethod(dwSoftISPDemosaicMethod method, dwSoftISPHandle_t obj);
360 
373 dwStatus dwSoftISP_getDemosaicMethod(dwSoftISPDemosaicMethod* method, dwSoftISPHandle_t obj);
374 
386 dwStatus dwSoftISP_setDemosaicROI(dwRect cropRegion, dwSoftISPHandle_t obj);
387 
399 dwStatus dwSoftISP_getDemosaicROI(dwRect* cropRegion, dwSoftISPHandle_t obj);
400 
412 dwStatus dwSoftISP_setDenoiseMethod(dwSoftISPDenoiseMethod method, dwSoftISPHandle_t obj);
413 
426 dwStatus dwSoftISP_getDenoiseMethod(dwSoftISPDenoiseMethod* method, dwSoftISPHandle_t obj);
427 
440 dwStatus dwSoftISP_getTonemapType(dwTonemapMethod* type, dwSoftISPHandle_t obj);
441 
455 dwStatus dwSoftISP_setTonemapType(dwTonemapMethod type, dwSoftISPHandle_t obj);
456 
469 dwStatus dwSoftISP_getWhiteBalanceMode(dwSoftISPWhiteBalanceMode* mode, dwSoftISPHandle_t obj);
470 
483 dwStatus dwSoftISP_setWhiteBalanceMode(dwSoftISPWhiteBalanceMode mode, dwSoftISPHandle_t obj);
484 
497 dwStatus dwSoftISP_setProcessType(const int32_t processType, dwSoftISPHandle_t obj);
498 
499 // DEPRECATED APIS
500 
501 // /**
502 // * Runs the Software ISP to convert the bound raw image into whatever output was bound beforehand.
503 // * The command will process as explained in the table at the beginning of the page (DW_SOFTISP_ is omitted).
504 // *
505 // * @param[in] type A bitwise mask of the process output chosen (must match or be a subset of the bound images).
506 // * @param[in] obj A pointer to the Software ISP handle.
507 // *
508 // * @return DW_SUCCESS, DW_INVALID_HANDLE
509 // * \ingroup soft_ISP
510 // *
511 // */
512 //DW_API_PUBLIC
513 //dwStatus dwSoftISP_processDeviceAsync(const uint32_t processType, dwSoftISPHandle_t obj);
514 
515 #ifdef __cplusplus
516 }
517 #endif
518 
520 #endif // DW_soft_ISP_H_
DW_API_PUBLIC dwStatus dwSoftISP_initParamsFromCamera(dwSoftISPParams *params, const dwCameraProperties *cameraProps)
Initializes the parameters for the softISP using dwCameraProperties.
NVIDIA DriveWorks API: Core Types
dwSoftISPDenoiseMethod
Definition: SoftISP.h:90
DW_API_PUBLIC dwStatus dwSoftISP_setDemosaicMethod(dwSoftISPDemosaicMethod method, dwSoftISPHandle_t obj)
Sets the method used to demosaic.
Defines a rectangle.
Definition: Types.h:191
DW_API_PUBLIC dwStatus dwSoftISP_getBayerImageProperties(dwImageProperties *imageProperties, dwSoftISPHandle_t obj)
Gets the image properties for the produced Bayer images.
NVIDIA DriveWorks API: Cameras
DW_API_PUBLIC dwStatus dwSoftISP_processDeviceAsync(dwSoftISPHandle_t obj)
Runs the Software ISP to convert the bound raw image into whatever output was bound beforehand...
dwCameraType cameraType
Camera Type.
Definition: SoftISP.h:122
const char * cameraModuleName
Definition: SoftISP.h:133
dwCameraRawFormat cameraRawFormat
Definition: SoftISP.h:125
Half camera resolution combining a 2x2 Bayer cell into one output pixel.
Definition: SoftISP.h:87
DW_API_PUBLIC dwStatus dwSoftISP_setTonemapType(dwTonemapMethod type, dwSoftISPHandle_t obj)
Sets the tonemap type.
DW_API_PUBLIC dwStatus dwSoftISP_bindOutputTonemap(dwImageCUDA *tonemappedImage, dwSoftISPHandle_t obj)
Binds a tone-mapped image to the softISP.
Defines a CUDA image.
Definition: Image.h:397
DW_API_PUBLIC dwStatus dwSoftISP_getDemosaicROI(dwRect *cropRegion, dwSoftISPHandle_t obj)
Gets the cropping region in the Bayer image used for demosaicing.
DW_API_PUBLIC dwStatus dwSoftISP_getDenoiseMethod(dwSoftISPDenoiseMethod *method, dwSoftISPHandle_t obj)
Gets the method used for denoising.
DW_API_PUBLIC dwStatus dwSoftISP_getDemosaicMethod(dwSoftISPDemosaicMethod *method, dwSoftISPHandle_t obj)
Gets the method used for demosaic.
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
DW_API_PUBLIC dwStatus dwSoftISP_getDemosaicImageProperties(dwImageProperties *imageProperties, dwSoftISPHandle_t obj)
Gets the image properties for the produced demosaiced images.
dwCameraType
Enum of available camera sensors.
Definition: Camera.h:122
Compute demosaic.
Definition: SoftISP.h:101
NVIDIA DriveWorks API: Tonemap Types
DW_API_PUBLIC dwStatus dwSoftISP_bindInputRaw(const dwImageCUDA *rawImage, dwSoftISPHandle_t obj)
Binds the input image to the softISP.
dwSoftISPWhiteBalanceMode
Definition: SoftISP.h:106
dwSoftISPProcessType
Definition: SoftISP.h:97
DW_API_PUBLIC dwStatus dwSoftISP_setProcessType(const int32_t processType, dwSoftISPHandle_t obj)
Sets the proceesed output type that will be computed.
uint32_t height
Input Image Height.
Definition: SoftISP.h:119
dwSoftISPDemosaicMethod
Definition: SoftISP.h:83
dwStatus
Status definition.
Definition: Status.h:180
dwTonemapMethod
Definition: Tonemap.h:49
DW_API_PUBLIC dwStatus dwSoftISP_setWhiteBalanceMode(dwSoftISPWhiteBalanceMode mode, dwSoftISPHandle_t obj)
Sets the whitebalance mode.
DW_API_PUBLIC dwStatus dwSoftISP_release(dwSoftISPHandle_t obj)
Releases the softISP pipeline object.
Image is white-balanced according to fixed parameters from the sensor.
Definition: SoftISP.h:108
DW_API_PUBLIC dwStatus dwSoftISP_setCUDAStream(cudaStream_t stream, dwSoftISPHandle_t obj)
Sets the CUDA stream for the softISP pipeline.
DW_API_PUBLIC dwStatus dwSoftISP_bindOutputDemosaic(dwImageCUDA *demosaicImage, dwSoftISPHandle_t obj)
Binds a demosaic image to the softISP.
Full camera resolution using interpolation.
Definition: SoftISP.h:85
Image is automatically white-balanced.
Definition: SoftISP.h:110
DW_API_PUBLIC dwStatus dwSoftISP_getWhiteBalanceMode(dwSoftISPWhiteBalanceMode *mode, dwSoftISPHandle_t obj)
Gets the whitebalance mode.
DW_API_PUBLIC dwStatus dwSoftISP_setDemosaicROI(dwRect cropRegion, dwSoftISPHandle_t obj)
Sets the cropping region in the Bayer image used for demosaicing.
Compute tone map.
Definition: SoftISP.h:103
DW_API_PUBLIC dwStatus dwSoftISP_setDenoiseMethod(dwSoftISPDenoiseMethod method, dwSoftISPHandle_t obj)
Sets the method used to denoise.
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:79
NVIDIA DriveWorks API: Core Methods
struct dwSoftISPObject * dwSoftISPHandle_t
Handle representing the Software ISP.
Definition: SoftISP.h:81
Camera Properties.
Definition: Camera.h:174
uint32_t width
Input Image Width.
Definition: SoftISP.h:116
DW_API_PUBLIC dwStatus dwSoftISP_getTonemapType(dwTonemapMethod *type, dwSoftISPHandle_t obj)
Gets the tonemap type.
DW_API_PUBLIC dwStatus dwSoftISP_getCUDAStream(cudaStream_t *stream, dwSoftISPHandle_t obj)
Gets the CUDA stream for the softISP pipeline.
DW_API_PUBLIC dwStatus dwSoftISP_initialize(dwSoftISPHandle_t *obj, const dwSoftISPParams *params, const dwContextHandle_t ctx)
Creates and initializes the software ISP pipeline.
dwCameraRawFormat
Raw encoding formats pixel-order.
Definition: Camera.h:98
dwTonemapMethod method
Tonemapper type (select UNKNOWN for default/no tonemapping)
Definition: SoftISP.h:131
#define DW_API_PUBLIC
Definition: Exports.h:54
DW_API_PUBLIC dwStatus dwSoftISP_reset(dwSoftISPHandle_t obj)
Resets the softISP pipeline.
DW_API_PUBLIC dwStatus dwSoftISP_bindOutputBayer(dwImageCUDA *bayerImage, dwSoftISPHandle_t obj)
Binds a Bayer image to the softISP.
uint32_t cameraRevision
Definition: SoftISP.h:128
Defines the properties of the image.
Definition: Image.h:367
Bilateral denoising.
Definition: SoftISP.h:94
NVIDIA DriveWorks API: Core Exports