NVIDIA DeepStream SDK API Reference

8.0 Release
cuosd.h File Reference

Go to the source code of this file.

Data Structures

struct  cuOSDContext
 
struct  _cuOSDColor
 

Typedefs

typedef cuOSDContextcuOSDContext_t
 
typedef struct _cuOSDColor cuOSDColor
 

Enumerations

enum  cuOSDClockFormat : int {
  cuOSDClockFormat::None = 0,
  cuOSDClockFormat::YYMMDD_HHMMSS = 1,
  cuOSDClockFormat::YYMMDD = 2,
  cuOSDClockFormat::HHMMSS = 3
}
 
enum  cuOSDImageFormat : int {
  cuOSDImageFormat::None = 0,
  cuOSDImageFormat::RGB = 1,
  cuOSDImageFormat::RGBA = 2,
  cuOSDImageFormat::BlockLinearNV12 = 3,
  cuOSDImageFormat::PitchLinearNV12 = 4
}
 
enum  cuOSDTextBackend : int {
  cuOSDTextBackend::None = 0,
  cuOSDTextBackend::PangoCairo = 1,
  cuOSDTextBackend::StbTrueType = 2
}
 

Functions

cuOSDContext_t cuosd_context_create ()
 
void cuosd_set_text_backend (cuOSDContext_t context, cuOSDTextBackend text_backend)
 
void cuosd_context_destroy (cuOSDContext_t context)
 
void cuosd_measure_text (cuOSDContext_t context, const char *utf8_text, int font_size, const char *font, int *width, int *height, int *yoffset)
 
void cuosd_draw_text (cuOSDContext_t context, const char *utf8_text, int font_size, const char *font, int x, int y, cuOSDColor border_color, cuOSDColor bg_color={0, 0, 0, 0})
 
void cuosd_draw_clock (cuOSDContext_t context, cuOSDClockFormat format, long time, int font_size, const char *font, int x, int y, cuOSDColor border_color, cuOSDColor bg_color={0, 0, 0, 0})
 
void cuosd_draw_line (cuOSDContext_t context, int x0, int y0, int x1, int y1, int thickness, cuOSDColor color, bool interpolation=true)
 
void cuosd_draw_arrow (cuOSDContext_t context, int x0, int y0, int x1, int y1, int arrow_size, int thickness, cuOSDColor color, bool interpolation=false)
 
void cuosd_draw_point (cuOSDContext_t context, int cx, int cy, int radius, cuOSDColor color)
 
void cuosd_draw_circle (cuOSDContext_t context, int cx, int cy, int radius, int thickness, cuOSDColor border_color, cuOSDColor bg_color={0, 0, 0, 0})
 
void cuosd_draw_rectangle (cuOSDContext_t context, int left, int top, int right, int bottom, int thickness, cuOSDColor border_color, cuOSDColor bg_color={0, 0, 0, 0})
 
void cuosd_draw_boxblur (cuOSDContext_t context, int left, int top, int right, int bottom, int kernel_size=7)
 
void cuosd_draw_rotationbox (cuOSDContext_t _context, int cx, int cy, int width, int height, float yaw, int thickness, cuOSDColor border_color, bool interpolation=false, cuOSDColor bg_color={0, 0, 0, 0})
 
void cuosd_draw_segmentmask (cuOSDContext_t context, int left, int top, int right, int bottom, int thickness, float *d_seg, int seg_width, int seg_height, float seg_threshold, cuOSDColor border_color, cuOSDColor seg_color={0, 0, 0, 0})
 
void cuosd_draw_polyline (cuOSDContext_t context, int *h_pts, int *d_pts, int n_pts, int thickness, bool is_closed, cuOSDColor border_color, bool interpolation=true, cuOSDColor fill_color={0, 0, 0, 0})
 
void cuosd_draw_rgba_source (cuOSDContext_t _context, int left, int top, int right, int bottom, void *d_src, int src_width, int src_stride, int src_height)
 
void cuosd_draw_nv12_source (cuOSDContext_t context, int left, int top, int right, int bottom, void *d_src0, void *d_src1, int src_width, int src_stride, int src_height, unsigned char alpha=127, bool block_linear=false)
 
void cuosd_apply (cuOSDContext_t context, void *data0, void *data1, int width, int stride, int height, cuOSDImageFormat format, void *stream=nullptr, bool launch_and_clear=true)
 
void cuosd_clear (cuOSDContext_t context)
 
void cuosd_launch (cuOSDContext_t context, void *data0, void *data1, int width, int stride, int height, cuOSDImageFormat format, void *stream=nullptr)
 

Typedef Documentation

◆ cuOSDColor

typedef struct _cuOSDColor cuOSDColor

◆ cuOSDContext_t

Definition at line 17 of file cuosd.h.

Enumeration Type Documentation

◆ cuOSDClockFormat

enum cuOSDClockFormat : int
strong
Enumerator
None 
YYMMDD_HHMMSS 
YYMMDD 
HHMMSS 

Definition at line 19 of file cuosd.h.

◆ cuOSDImageFormat

enum cuOSDImageFormat : int
strong
Enumerator
None 
RGB 
RGBA 
BlockLinearNV12 
PitchLinearNV12 

Definition at line 26 of file cuosd.h.

◆ cuOSDTextBackend

enum cuOSDTextBackend : int
strong
Enumerator
None 
PangoCairo 
StbTrueType 

Definition at line 34 of file cuosd.h.

Function Documentation

◆ cuosd_apply()

void cuosd_apply ( cuOSDContext_t  context,
void *  data0,
void *  data1,
int  width,
int  stride,
int  height,
cuOSDImageFormat  format,
void *  stream = nullptr,
bool  launch_and_clear = true 
)

◆ cuosd_clear()

void cuosd_clear ( cuOSDContext_t  context)

◆ cuosd_context_create()

cuOSDContext_t cuosd_context_create ( )

◆ cuosd_context_destroy()

void cuosd_context_destroy ( cuOSDContext_t  context)

◆ cuosd_draw_arrow()

void cuosd_draw_arrow ( cuOSDContext_t  context,
int  x0,
int  y0,
int  x1,
int  y1,
int  arrow_size,
int  thickness,
cuOSDColor  color,
bool  interpolation = false 
)

◆ cuosd_draw_boxblur()

void cuosd_draw_boxblur ( cuOSDContext_t  context,
int  left,
int  top,
int  right,
int  bottom,
int  kernel_size = 7 
)

◆ cuosd_draw_circle()

void cuosd_draw_circle ( cuOSDContext_t  context,
int  cx,
int  cy,
int  radius,
int  thickness,
cuOSDColor  border_color,
cuOSDColor  bg_color = {0, 0, 0, 0} 
)

◆ cuosd_draw_clock()

void cuosd_draw_clock ( cuOSDContext_t  context,
cuOSDClockFormat  format,
long  time,
int  font_size,
const char *  font,
int  x,
int  y,
cuOSDColor  border_color,
cuOSDColor  bg_color = {0, 0, 0, 0} 
)

◆ cuosd_draw_line()

void cuosd_draw_line ( cuOSDContext_t  context,
int  x0,
int  y0,
int  x1,
int  y1,
int  thickness,
cuOSDColor  color,
bool  interpolation = true 
)

◆ cuosd_draw_nv12_source()

void cuosd_draw_nv12_source ( cuOSDContext_t  context,
int  left,
int  top,
int  right,
int  bottom,
void *  d_src0,
void *  d_src1,
int  src_width,
int  src_stride,
int  src_height,
unsigned char  alpha = 127,
bool  block_linear = false 
)

◆ cuosd_draw_point()

void cuosd_draw_point ( cuOSDContext_t  context,
int  cx,
int  cy,
int  radius,
cuOSDColor  color 
)

◆ cuosd_draw_polyline()

void cuosd_draw_polyline ( cuOSDContext_t  context,
int *  h_pts,
int *  d_pts,
int  n_pts,
int  thickness,
bool  is_closed,
cuOSDColor  border_color,
bool  interpolation = true,
cuOSDColor  fill_color = {0, 0, 0, 0} 
)

◆ cuosd_draw_rectangle()

void cuosd_draw_rectangle ( cuOSDContext_t  context,
int  left,
int  top,
int  right,
int  bottom,
int  thickness,
cuOSDColor  border_color,
cuOSDColor  bg_color = {0, 0, 0, 0} 
)

◆ cuosd_draw_rgba_source()

void cuosd_draw_rgba_source ( cuOSDContext_t  _context,
int  left,
int  top,
int  right,
int  bottom,
void *  d_src,
int  src_width,
int  src_stride,
int  src_height 
)

◆ cuosd_draw_rotationbox()

void cuosd_draw_rotationbox ( cuOSDContext_t  _context,
int  cx,
int  cy,
int  width,
int  height,
float  yaw,
int  thickness,
cuOSDColor  border_color,
bool  interpolation = false,
cuOSDColor  bg_color = {0, 0, 0, 0} 
)

◆ cuosd_draw_segmentmask()

void cuosd_draw_segmentmask ( cuOSDContext_t  context,
int  left,
int  top,
int  right,
int  bottom,
int  thickness,
float *  d_seg,
int  seg_width,
int  seg_height,
float  seg_threshold,
cuOSDColor  border_color,
cuOSDColor  seg_color = {0, 0, 0, 0} 
)

◆ cuosd_draw_text()

void cuosd_draw_text ( cuOSDContext_t  context,
const char *  utf8_text,
int  font_size,
const char *  font,
int  x,
int  y,
cuOSDColor  border_color,
cuOSDColor  bg_color = {0, 0, 0, 0} 
)

◆ cuosd_launch()

void cuosd_launch ( cuOSDContext_t  context,
void *  data0,
void *  data1,
int  width,
int  stride,
int  height,
cuOSDImageFormat  format,
void *  stream = nullptr 
)

◆ cuosd_measure_text()

void cuosd_measure_text ( cuOSDContext_t  context,
const char *  utf8_text,
int  font_size,
const char *  font,
int *  width,
int *  height,
int *  yoffset 
)

◆ cuosd_set_text_backend()

void cuosd_set_text_backend ( cuOSDContext_t  context,
cuOSDTextBackend  text_backend 
)