DriveWorks SDK Reference
5.16.65 Release
For Test and Development only

Threshold.h
Go to the documentation of this file.
1
2//
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-2023 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
46#ifndef DW_IMAGEPROCESSING_SEGMENTATION_THRESHOLDING_H_
47#define DW_IMAGEPROCESSING_SEGMENTATION_THRESHOLDING_H_
48
50#include <dw/core/base/Types.h>
51#include <dw/image/Image.h>
52
53#ifdef __cplusplus
54extern "C" {
55#endif
56
57typedef struct dwThresholdObject* dwThresholdHandle_t;
58
60typedef enum dwThresholdBehavior {
68
69typedef enum dwThresholdMode {
77
79{
85 uint32_t maxVal;
87 bool inverse;
89 cudaStream_t stream;
97
110 dwContextHandle_t context);
111
121
132
146
171
184
185#ifdef __cplusplus
186}
187#endif
189#endif // DW_IMAGEPROCESSING_SEGMENTATION_THRESHOLDING_H_
NVIDIA DriveWorks API: Core Methods
dwStatus
Status definition.
Definition: ErrorDefs.h:44
NVIDIA DriveWorks API: Core Types
dwImageHandle_t thresholdingImage
thresholding image for MODE_PER_PIXEL.
Definition: Threshold.h:95
dwThresholdBehavior behavior
threshold behavior
Definition: Threshold.h:83
bool inverse
if false the comparison is pixel > threshold, else pixel < threshold
Definition: Threshold.h:87
cudaStream_t stream
cuda stream
Definition: Threshold.h:89
uint32_t manualThresholdValue
manual value for MODE_SIMPLE
Definition: Threshold.h:91
uint32_t maxVal
maximum value
Definition: Threshold.h:85
dwThresholdMode mode
threshold mode
Definition: Threshold.h:81
DW_API_PUBLIC dwStatus dwThreshold_getCUDAStream(cudaStream_t *stream, dwThresholdHandle_t obj)
Gets the cuda stream used by the APIs of Image Threshold.
DW_API_PUBLIC dwStatus dwThreshold_release(dwThresholdHandle_t handle)
Releases an Threshold Handle.
DW_API_PUBLIC dwStatus dwThreshold_initialize(dwThresholdHandle_t *handle, dwThresholdParameters params, dwContextHandle_t context)
Initializes a Threshold Handle.
dwThresholdBehavior
thresholding behavior based on comparison (a > b if dwThresholdParameters.inverse is false,...
Definition: Threshold.h:60
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.
DW_API_PUBLIC dwStatus dwThreshold_reset(dwThresholdHandle_t obj)
Resets an Threshold Handle.
dwThresholdMode
Definition: Threshold.h:69
struct dwThresholdObject * dwThresholdHandle_t
Definition: Threshold.h:57
DW_API_PUBLIC dwStatus dwThreshold_setThresholdParameters(dwThresholdParameters parameters, dwThresholdHandle_t obj)
Changes the threshold parameters in runtime.
DW_API_PUBLIC dwStatus dwThreshold_setCUDAStream(cudaStream_t stream, dwThresholdHandle_t obj)
Sets the cuda stream used by the APIs of Image Threshold.
@ DW_THRESHOLD_BEHAVIOR_BINARY
if comparison between pixel and thresh yields true, pixel = maxval else 0
Definition: Threshold.h:62
@ DW_THRESHOLD_BEHAVIOR_TO_ZERO
if comparison between pixel and thresh yields true, pixel = pixel else 0
Definition: Threshold.h:66
@ DW_THRESHOLD_BEHAVIOR_TRUNCATE
if comparison between pixel and thresh yields true, pixel = thresh else pixel
Definition: Threshold.h:64
@ DW_THRESHOLD_MODE_OTSU
automatically computes the best threshold (assuming bimodal histogram, see N. Otsu,...
Definition: Threshold.h:73
@ DW_THRESHOLD_MODE_SIMPLE
based on a user selected manualThresholdValue
Definition: Threshold.h:71
@ DW_THRESHOLD_MODE_PER_PIXEL
each pixel of the input image is thresholded individually
Definition: Threshold.h:75
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:86
#define DW_API_PUBLIC
Definition: Exports.h:56
struct dwImageObject * dwImageHandle_t
Definition: Image.h:105
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality