NVIDIA DeepStream SDK API Reference

9.1 Release
sources/libs/nvll_osd/cuda/drawOBB.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
29 #ifndef __DRAW_OBB_H__
30 #define __DRAW_OBB_H__
31 
32 #include <stdint.h>
33 #include <cuda_runtime.h>
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
64  uint8_t *image,
65  int width, int height, int pitch,
66  float center_x, float center_y,
67  float obb_width, float obb_height,
68  float angle_rad,
69  cudaStream_t stream,
70  unsigned int r, unsigned int g, unsigned int b,
71  int border_width);
72 
98  uint8_t *image,
99  int width, int height, int pitch,
100  float center_x, float center_y,
101  float obb_width, float obb_height,
102  float angle_rad,
103  cudaStream_t stream,
104  unsigned int r, unsigned int g, unsigned int b,
105  float alpha,
106  int border_width);
107 
130  uint8_t *image,
131  int width, int height, int pitch,
132  float center_x, float center_y,
133  float obb_width, float obb_height,
134  float angle_rad,
135  unsigned int r, unsigned int g, unsigned int b,
136  cudaStream_t stream);
137 
158 void drawOBB_fill_cuda(
159  uint8_t *image,
160  int width, int height, int pitch,
161  float center_x, float center_y,
162  float obb_width, float obb_height,
163  float angle_rad,
164  unsigned int r, unsigned int g, unsigned int b,
165  float alpha,
166  cudaStream_t stream);
167 
197  uint8_t *image,
198  int width, int height, int pitch,
199  float center_x, float center_y,
200  float obb_width, float obb_height,
201  float angle_rad,
202  cudaStream_t stream,
203  unsigned int border_r, unsigned int border_g, unsigned int border_b,
204  int border_width,
205  unsigned int fill_r, unsigned int fill_g, unsigned int fill_b,
206  bool is_filled);
207 
239  uint8_t *image,
240  int width, int height, int pitch,
241  float center_x, float center_y,
242  float obb_width, float obb_height,
243  float angle_rad,
244  cudaStream_t stream,
245  unsigned int border_r, unsigned int border_g, unsigned int border_b,
246  float border_alpha,
247  int border_width,
248  unsigned int fill_r, unsigned int fill_g, unsigned int fill_b,
249  float fill_alpha,
250  bool is_filled);
251 
252 #ifdef __cplusplus
253 }
254 #endif
255 
256 #endif // __DRAW_OBB_H__
257 
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: sources/includes/nvbufsurftransform.h:35
drawOBB_combined_cuda_unit_alpha
void drawOBB_combined_cuda_unit_alpha(uint8_t *image, int width, int height, int pitch, float center_x, float center_y, float obb_width, float obb_height, float angle_rad, cudaStream_t stream, unsigned int border_r, unsigned int border_g, unsigned int border_b, int border_width, unsigned int fill_r, unsigned int fill_g, unsigned int fill_b, bool is_filled)
Draw OBB with both fill and border (unit alpha, fast path)
drawOBB_fill_cuda
void drawOBB_fill_cuda(uint8_t *image, int width, int height, int pitch, float center_x, float center_y, float obb_width, float obb_height, float angle_rad, unsigned int r, unsigned int g, unsigned int b, float alpha, cudaStream_t stream)
Fill OBB with alpha blending.
drawOBB_combined_cuda
void drawOBB_combined_cuda(uint8_t *image, int width, int height, int pitch, float center_x, float center_y, float obb_width, float obb_height, float angle_rad, cudaStream_t stream, unsigned int border_r, unsigned int border_g, unsigned int border_b, float border_alpha, int border_width, unsigned int fill_r, unsigned int fill_g, unsigned int fill_b, float fill_alpha, bool is_filled)
Draw OBB with both fill and border (with alpha blending)
drawOBB_border_cuda
void drawOBB_border_cuda(uint8_t *image, int width, int height, int pitch, float center_x, float center_y, float obb_width, float obb_height, float angle_rad, cudaStream_t stream, unsigned int r, unsigned int g, unsigned int b, float alpha, int border_width)
Draw OBB border with alpha blending.
drawOBB_border_cuda_unit_alpha
void drawOBB_border_cuda_unit_alpha(uint8_t *image, int width, int height, int pitch, float center_x, float center_y, float obb_width, float obb_height, float angle_rad, cudaStream_t stream, unsigned int r, unsigned int g, unsigned int b, int border_width)
Draw OBB border with unit alpha (opaque, fast path)
drawOBB_fill_cuda_unit_alpha
void drawOBB_fill_cuda_unit_alpha(uint8_t *image, int width, int height, int pitch, float center_x, float center_y, float obb_width, float obb_height, float angle_rad, unsigned int r, unsigned int g, unsigned int b, cudaStream_t stream)
Fill OBB with solid color (unit alpha, fast path)