NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
Threshold.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2015-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
31 #ifndef DW_IMAGEPROCESSING_SEGMENTATION_THRESHOLDING_H_
32 #define DW_IMAGEPROCESSING_SEGMENTATION_THRESHOLDING_H_
33 
34 #include <dw/core/context/Context.h>
35 #include <dw/core/base/Types.h>
36 #include <dw/image/Image.h>
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 typedef struct dwThresholdObject* dwThresholdHandle_t;
43 
45 typedef enum dwThresholdBehavior {
53 
54 typedef enum dwThresholdMode {
62 
63 typedef struct dwThresholdParameters
64 {
70  uint32_t maxVal;
72  bool inverse;
74  cudaStream_t stream;
82 
99  dwContextHandle_t context);
100 
114 
129 
147 
180 
200 
201 #ifdef __cplusplus
202 }
203 #endif
204 #endif // DW_IMAGEPROCESSING_SEGMENTATION_THRESHOLDING_H_
205 
DW_THRESHOLD_MODE_OTSU
@ DW_THRESHOLD_MODE_OTSU
automatically computes the best threshold (assuming bimodal histogram, see N. Otsu,...
Definition: Threshold.h:58
dwThreshold_applyThreshold
DW_API_PUBLIC dwStatus dwThreshold_applyThreshold(dwImageHandle_t outputImage, const dwImageHandle_t inputImage, dwThresholdHandle_t obj)
Runs the Threshold Handle on input image using the operations set in dwThreshold_setOperations.
dwThreshold_reset
DW_API_PUBLIC dwStatus dwThreshold_reset(dwThresholdHandle_t obj)
Resets an Threshold Handle.
dwThresholdBehavior
dwThresholdBehavior
thresholding behavior based on comparison (a > b if dwThresholdParameters.inverse is false,...
Definition: Threshold.h:45
dwThresholdParameters::behavior
dwThresholdBehavior behavior
threshold behavior
Definition: Threshold.h:68
dwThresholdParameters::mode
dwThresholdMode mode
threshold mode
Definition: Threshold.h:66
DW_THRESHOLD_BEHAVIOR_TO_ZERO
@ DW_THRESHOLD_BEHAVIOR_TO_ZERO
if comparison between pixel and thresh yields true, pixel = pixel else 0
Definition: Threshold.h:51
DW_THRESHOLD_MODE_SIMPLE
@ DW_THRESHOLD_MODE_SIMPLE
based on a user selected manualThresholdValue
Definition: Threshold.h:56
DW_THRESHOLD_BEHAVIOR_BINARY
@ DW_THRESHOLD_BEHAVIOR_BINARY
if comparison between pixel and thresh yields true, pixel = maxval else 0
Definition: Threshold.h:47
handle
const WFDCommitType const WFDHandle handle
Definition: wfdext.h:124
dwThresholdParameters::stream
cudaStream_t stream
cuda stream
Definition: Threshold.h:74
dwThresholdParameters::inverse
bool inverse
if false the comparison is pixel > threshold, else pixel < threshold
Definition: Threshold.h:72
dwThreshold_getCUDAStream
DW_API_PUBLIC dwStatus dwThreshold_getCUDAStream(cudaStream_t *stream, dwThresholdHandle_t obj)
Gets the cuda stream used by the APIs of Image Threshold.
dwThresholdParameters::manualThresholdValue
uint32_t manualThresholdValue
manual value for MODE_SIMPLE
Definition: Threshold.h:76
dwThreshold_initialize
DW_API_PUBLIC dwStatus dwThreshold_initialize(dwThresholdHandle_t *handle, dwThresholdParameters params, dwContextHandle_t context)
Initializes a Threshold Handle.
dwContextHandle_t
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:74
dwThresholdHandle_t
struct dwThresholdObject * dwThresholdHandle_t
Definition: Threshold.h:42
dwThresholdMode
dwThresholdMode
Definition: Threshold.h:54
DW_THRESHOLD_BEHAVIOR_TRUNCATE
@ DW_THRESHOLD_BEHAVIOR_TRUNCATE
if comparison between pixel and thresh yields true, pixel = thresh else pixel
Definition: Threshold.h:49
dwImageHandle_t
struct dwImageObject * dwImageHandle_t
Definition: Image.h:88
dwThresholdParameters::thresholdingImage
dwImageHandle_t thresholdingImage
thresholding image for MODE_PER_PIXEL.
Definition: Threshold.h:80
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:27
params
DW_API_PUBLIC dwPointCloudRangeImageCreatorParams const *const params
Definition: PointCloudRangeImageCreator.h:292
dwThreshold_setThresholdParameters
DW_API_PUBLIC dwStatus dwThreshold_setThresholdParameters(dwThresholdParameters parameters, dwThresholdHandle_t obj)
Changes the threshold parameters in runtime.
dwThresholdParameters
struct dwThresholdParameters dwThresholdParameters
dwThreshold_release
DW_API_PUBLIC dwStatus dwThreshold_release(dwThresholdHandle_t handle)
Releases an Threshold Handle.
DW_API_PUBLIC
#define DW_API_PUBLIC
Definition: Exports.h:38
dwThresholdParameters
Definition: Threshold.h:63
DW_THRESHOLD_MODE_PER_PIXEL
@ DW_THRESHOLD_MODE_PER_PIXEL
each pixel of the input image is thresholded individually
Definition: Threshold.h:60
obj
const NvSciSyncObj *const obj
Definition: wfdext.h:120
dwThreshold_setCUDAStream
DW_API_PUBLIC dwStatus dwThreshold_setCUDAStream(cudaStream_t stream, dwThresholdHandle_t obj)
Sets the cuda stream used by the APIs of Image Threshold.
dwThresholdParameters::maxVal
uint32_t maxVal
maximum value
Definition: Threshold.h:70