NVIDIA DeepStream SDK API Reference

9.1 Release
9.1/sources/includes/nvll_osd_struct.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-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 
34 #ifndef __NVLL_OSD_STRUCT_DEFS__
35 #define __NVLL_OSD_STRUCT_DEFS__
36 
37 #include <stdbool.h>
38 
39 #ifdef __cplusplus
40 extern "C"
41 {
42 #endif
43 
47 typedef enum {
53 } NvOSD_Mode;
54 
58 typedef enum
59 {
67 
71 typedef struct _NvBbox_Coords {
72  float left;
75  float top;
78  float width;
80  float height;
82 
86 typedef struct _NvOSD_ColorParams {
87  double red;
90  double green;
93  double blue;
96  double alpha;
99 
103 typedef struct _NvOSD_FontParams {
104  char * font_name;
108 // char font_name[64]; /**< Holds a pointer to a string containing
109 // the font name. */
110 
111  unsigned int font_size;
115 
116 
120 typedef struct _NvOSD_TextParams {
121  char * display_text;
123  unsigned int x_offset;
125  unsigned int y_offset;
129  int set_bg_clr;
136 
137 typedef struct _NvOSD_Color_info {
138  int id;
141 
145 typedef struct _NvOSD_RectParams {
146  float left;
149  float top;
152  float width;
154  float height;
156  unsigned int border_width;
161  unsigned int has_bg_color;
164  unsigned int reserved;
168  int has_color_info;
169  int color_id;
170 
171  float rotation_angle;
173 
177 typedef struct _NvOSD_MaskParams {
178  float *data;
179  unsigned int size;
180  float threshold;
181  unsigned int width;
182  unsigned int height;
184 
188 typedef struct _NvOSD_LineParams {
189  unsigned int x1;
192  unsigned int y1;
195  unsigned int x2;
197  unsigned int y2;
199  unsigned int line_width;
203 
207 typedef struct _NvOSD_ArrowParams {
208  unsigned int x1;
210  unsigned int y1;
212  unsigned int x2;
214  unsigned int y2;
216  unsigned int arrow_width;
224  unsigned int reserved;
227 
231 typedef struct _NvOSD_CircleParams {
232  unsigned int xc;
234  unsigned int yc;
236  unsigned int radius;
241  unsigned int has_bg_color; /*< Holds a Boolean value indicating whether
242  the circle has a background color. */
243 
244  NvOSD_ColorParams bg_color; /*< Holds the circle's background color. */
245 
246  unsigned int circle_width;
248  unsigned int reserved;
251 
252 #ifdef __cplusplus
253 }
254 #endif
255 
256 #endif
_NvOSD_ArrowParams::y1
unsigned int y1
Holds the start vertical coordinate in pixels.
Definition: sources/includes/nvll_osd_struct.h:210
_NvOSD_TextParams::display_text
char * display_text
Holds the text to be overlayed.
Definition: sources/includes/nvll_osd_struct.h:121
_NvOSD_LineParams
Holds the box parameters of a line to be overlayed.
Definition: sources/includes/nvll_osd_struct.h:188
_NvOSD_MaskParams::threshold
float threshold
Size of mask buffer in bytes.
Definition: sources/includes/nvll_osd_struct.h:180
NvOSD_MaskParams
struct _NvOSD_MaskParams NvOSD_MaskParams
Holds the mask parameters of the segment to be overlayed.
_NvOSD_RectParams
Holds the box parameters of the box to be overlayed.
Definition: sources/includes/nvll_osd_struct.h:145
_NvOSD_MaskParams
Holds the mask parameters of the segment to be overlayed.
Definition: sources/includes/nvll_osd_struct.h:177
_NvOSD_ArrowParams::x2
unsigned int x2
Holds the end horizontal coordinate in pixels.
Definition: sources/includes/nvll_osd_struct.h:212
_NvOSD_RectParams::width
float width
Holds the box's width in pixels.
Definition: sources/includes/nvll_osd_struct.h:152
_NvOSD_ArrowParams::arrow_width
unsigned int arrow_width
Holds the arrow shaft width in pixels.
Definition: sources/includes/nvll_osd_struct.h:216
_NvOSD_Color_info
Definition: sources/includes/nvll_osd_struct.h:137
_NvOSD_RectParams::bg_color
NvOSD_ColorParams bg_color
Holds the box's background color.
Definition: sources/includes/nvll_osd_struct.h:166
_NvOSD_CircleParams::yc
unsigned int yc
Holds the start vertical coordinate in pixels.
Definition: sources/includes/nvll_osd_struct.h:234
MODE_GPU
@ MODE_GPU
Specifies using the GPU for OSD processing.
Definition: 9.1/sources/includes/nvll_osd_struct.h:50
_NvBbox_Coords::height
float height
Holds the box's height in pixels.
Definition: sources/includes/nvll_osd_struct.h:80
_NvOSD_LineParams::y1
unsigned int y1
Holds the box's top coordinate in pixels.
Definition: sources/includes/nvll_osd_struct.h:192
_NvOSD_LineParams::x1
unsigned int x1
Holds the box's left coordinate in pixels.
Definition: sources/includes/nvll_osd_struct.h:189
_NvOSD_CircleParams
Holds circle parameters to be overlayed.
Definition: sources/includes/nvll_osd_struct.h:231
MODE_NONE
@ MODE_NONE
Invalid mode.
Definition: 9.1/sources/includes/nvll_osd_struct.h:52
_NvOSD_FontParams::font_size
unsigned int font_size
Holds the size of the font.
Definition: sources/includes/nvll_osd_struct.h:111
NvOSD_LineParams
struct _NvOSD_LineParams NvOSD_LineParams
Holds the box parameters of a line to be overlayed.
_NvOSD_Color_info::color
NvOSD_ColorParams color
Definition: sources/includes/nvll_osd_struct.h:139
_NvOSD_FontParams::font_name
char * font_name
Holds a pointer to the string containing the font name.
Definition: sources/includes/nvll_osd_struct.h:104
_NvOSD_ColorParams::red
double red
Holds the red component of color.
Definition: sources/includes/nvll_osd_struct.h:87
_NvOSD_TextParams::set_bg_clr
int set_bg_clr
Holds a Boolean; true if the text has a background color.
Definition: sources/includes/nvll_osd_struct.h:129
_NvBbox_Coords::left
float left
Holds the box's left coordinate in pixels.
Definition: sources/includes/nvll_osd_struct.h:72
_NvOSD_LineParams::line_width
unsigned int line_width
Holds the box's border width in pixels.
Definition: sources/includes/nvll_osd_struct.h:199
_NvOSD_TextParams::y_offset
unsigned int y_offset
Holds the text's vertical offset from the top left pixel of the frame.
Definition: sources/includes/nvll_osd_struct.h:125
START_HEAD
@ START_HEAD
Specifies an arrow head only at start = 0.
Definition: 9.1/sources/includes/nvll_osd_struct.h:61
_NvOSD_CircleParams::circle_width
unsigned int circle_width
Holds the circle's border width in pixels.
Definition: sources/includes/nvll_osd_struct.h:246
_NvOSD_FontParams::font_color
NvOSD_ColorParams font_color
Holds the font color.
Definition: sources/includes/nvll_osd_struct.h:113
_NvOSD_RectParams::reserved
unsigned int reserved
Holds a field reserved for future use.
Definition: sources/includes/nvll_osd_struct.h:164
_NvOSD_ArrowParams::arrow_head
NvOSD_Arrow_Head_Direction arrow_head
Holds the arrowhead position.
Definition: sources/includes/nvll_osd_struct.h:218
_NvOSD_ArrowParams
Holds arrow parameters to be overlaid.
Definition: sources/includes/nvll_osd_struct.h:207
NvOSD_Color_info
struct _NvOSD_Color_info NvOSD_Color_info
_NvOSD_MaskParams::data
float * data
Definition: sources/includes/nvll_osd_struct.h:178
NvOSD_CircleParams
struct _NvOSD_CircleParams NvOSD_CircleParams
Holds circle parameters to be overlayed.
_NvOSD_ArrowParams::y2
unsigned int y2
Holds the end vertical coordinate in pixels.
Definition: sources/includes/nvll_osd_struct.h:214
_NvOSD_MaskParams::size
unsigned int size
Mask buffer.
Definition: sources/includes/nvll_osd_struct.h:179
_NvOSD_CircleParams::radius
unsigned int radius
Holds the radius of circle in pixels.
Definition: sources/includes/nvll_osd_struct.h:236
_NvOSD_CircleParams::has_bg_color
unsigned int has_bg_color
Definition: sources/includes/nvll_osd_struct.h:241
NvOSD_TextParams
struct _NvOSD_TextParams NvOSD_TextParams
Holds parameters of text to be overlayed.
_NvOSD_FontParams
Holds the font parameters of the text to be overlayed.
Definition: sources/includes/nvll_osd_struct.h:103
_NvOSD_MaskParams::width
unsigned int width
Threshold for binarization.
Definition: sources/includes/nvll_osd_struct.h:181
_NvOSD_LineParams::x2
unsigned int x2
Holds the box's width in pixels.
Definition: sources/includes/nvll_osd_struct.h:195
_NvOSD_ColorParams::blue
double blue
Holds the blue component of color.
Definition: sources/includes/nvll_osd_struct.h:93
_NvOSD_RectParams::rotation_angle
float rotation_angle
Holds the box's rotation angle in degrees in case of OBB.
Definition: sources/includes/nvll_osd_struct.h:171
_NvOSD_RectParams::has_color_info
int has_color_info
Definition: sources/includes/nvll_osd_struct.h:168
NvBbox_Coords
struct _NvBbox_Coords NvBbox_Coords
Holds unclipped bounding box coordinates of the object.
_NvBbox_Coords::width
float width
Holds the box's width in pixels.
Definition: sources/includes/nvll_osd_struct.h:78
_NvOSD_TextParams::text_bg_clr
NvOSD_ColorParams text_bg_clr
Holds the text's background color, if specified.
Definition: sources/includes/nvll_osd_struct.h:132
_NvOSD_ArrowParams::reserved
unsigned int reserved
Reserved for future use; currently for internal use only.
Definition: sources/includes/nvll_osd_struct.h:224
NvOSD_Mode
NvOSD_Mode
Defines modes used to overlay boxes and text.
Definition: 9.1/sources/includes/nvll_osd_struct.h:47
_NvOSD_RectParams::color_id
int color_id
Definition: sources/includes/nvll_osd_struct.h:169
BOTH_HEAD
@ BOTH_HEAD
Specifies arrow heads at both start and end = 2.
Definition: 9.1/sources/includes/nvll_osd_struct.h:65
_NvOSD_Color_info::id
int id
Definition: sources/includes/nvll_osd_struct.h:138
_NvOSD_RectParams::left
float left
Holds the box's left coordinate in pixels.
Definition: sources/includes/nvll_osd_struct.h:146
_NvOSD_RectParams::border_color
NvOSD_ColorParams border_color
Holds the box's border color.
Definition: sources/includes/nvll_osd_struct.h:158
NvOSD_FontParams
struct _NvOSD_FontParams NvOSD_FontParams
Holds the font parameters of the text to be overlayed.
_NvOSD_RectParams::has_bg_color
unsigned int has_bg_color
Holds a Boolean; true if the box has a background color.
Definition: sources/includes/nvll_osd_struct.h:161
_NvOSD_MaskParams::height
unsigned int height
Mask width.
Definition: sources/includes/nvll_osd_struct.h:182
_NvOSD_TextParams::x_offset
unsigned int x_offset
Holds the text's horizontal offset from the top left pixel of the frame.
Definition: sources/includes/nvll_osd_struct.h:123
_NvOSD_ArrowParams::x1
unsigned int x1
Holds the start horizontal coordinate in pixels.
Definition: sources/includes/nvll_osd_struct.h:208
_NvOSD_TextParams::font_params
NvOSD_FontParams font_params
Holds the font parameters of the text to be overlaid.
Definition: sources/includes/nvll_osd_struct.h:127
NvOSD_ArrowParams
struct _NvOSD_ArrowParams NvOSD_ArrowParams
Holds arrow parameters to be overlaid.
MODE_CPU
@ MODE_CPU
Specifies using the CPU for OSD processing.
Definition: 9.1/sources/includes/nvll_osd_struct.h:48
END_HEAD
@ END_HEAD
Specifies an arrow head only at end = 1.
Definition: 9.1/sources/includes/nvll_osd_struct.h:63
_NvOSD_TextParams
Holds parameters of text to be overlayed.
Definition: sources/includes/nvll_osd_struct.h:120
_NvOSD_ArrowParams::arrow_color
NvOSD_ColorParams arrow_color
Holds color parameters of the arrow box.
Definition: sources/includes/nvll_osd_struct.h:221
_NvOSD_ColorParams
Holds the color parameters of the box or text to be overlayed.
Definition: sources/includes/nvll_osd_struct.h:86
_NvOSD_RectParams::height
float height
Holds the box's height in pixels.
Definition: sources/includes/nvll_osd_struct.h:154
_NvOSD_ColorParams::green
double green
Holds the green component of color.
Definition: sources/includes/nvll_osd_struct.h:90
_NvOSD_CircleParams::xc
unsigned int xc
Holds the start horizontal coordinate in pixels.
Definition: sources/includes/nvll_osd_struct.h:232
NvOSD_RectParams
struct _NvOSD_RectParams NvOSD_RectParams
Holds the box parameters of the box to be overlayed.
_NvOSD_CircleParams::circle_color
NvOSD_ColorParams circle_color
Holds the color parameters of the arrow box.
Definition: sources/includes/nvll_osd_struct.h:238
_NvOSD_CircleParams::reserved
unsigned int reserved
Reserved for future use; currently for internal use only.
Definition: sources/includes/nvll_osd_struct.h:248
_NvOSD_CircleParams::bg_color
NvOSD_ColorParams bg_color
Definition: sources/includes/nvll_osd_struct.h:244
_NvOSD_LineParams::line_color
NvOSD_ColorParams line_color
Holds the box's border color.
Definition: sources/includes/nvll_osd_struct.h:201
_NvOSD_RectParams::border_width
unsigned int border_width
Holds the box's border width in pixels.
Definition: sources/includes/nvll_osd_struct.h:156
_NvBbox_Coords::top
float top
Holds the box's top coordinate in pixels.
Definition: sources/includes/nvll_osd_struct.h:75
NvOSD_ColorParams
struct _NvOSD_ColorParams NvOSD_ColorParams
Holds the color parameters of the box or text to be overlayed.
_NvOSD_RectParams::top
float top
Holds the box's top coordinate in pixels.
Definition: sources/includes/nvll_osd_struct.h:149
NvOSD_Arrow_Head_Direction
NvOSD_Arrow_Head_Direction
Specifies arrow head positions.
Definition: 9.1/sources/includes/nvll_osd_struct.h:58
_NvBbox_Coords
Holds unclipped bounding box coordinates of the object.
Definition: sources/includes/nvll_osd_struct.h:71
_NvOSD_ColorParams::alpha
double alpha
Holds the alpha component of color.
Definition: sources/includes/nvll_osd_struct.h:96
_NvOSD_LineParams::y2
unsigned int y2
Holds the box's height in pixels.
Definition: sources/includes/nvll_osd_struct.h:197