NVIDIA DeepStream SDK API Reference6.0.1 Release |
Defines the NvOSD library to be used to draw rectangles and text over the frame.
Data Structures | |
struct | _NvOSD_FrameTextParams |
Holds information about the text in a frame. More... | |
struct | _NvOSD_FrameRectParams |
Holds information about the rectangles in a frame. More... | |
struct | _NvOSD_FrameSegmentMaskParams |
Holds information about the rectangles in a frame. More... | |
struct | _NvOSD_FrameLineParams |
Holds information about the lines in a frame. More... | |
struct | _NvOSD_FrameArrowParams |
Holds information about the arrows in a frame. More... | |
struct | _NvOSD_FrameCircleParams |
Holds information about the circles in a frame. More... | |
Macros | |
#define | NVOSD_PRINT_E(f_,...) printf("libnvosd (%d):(ERROR) : " f_, __LINE__, ##__VA_ARGS__) |
#define | MAX_IN_BUF 16 |
#define | MAX_BORDER_WIDTH 32 |
Typedefs | |
typedef void * | NvOSDCtxHandle |
typedef struct _NvOSD_FrameTextParams | NvOSD_FrameTextParams |
Holds information about the text in a frame. More... | |
typedef struct _NvOSD_FrameRectParams | NvOSD_FrameRectParams |
Holds information about the rectangles in a frame. More... | |
typedef struct _NvOSD_FrameSegmentMaskParams | NvOSD_FrameSegmentMaskParams |
Holds information about the rectangles in a frame. More... | |
typedef struct _NvOSD_FrameLineParams | NvOSD_FrameLineParams |
Holds information about the lines in a frame. More... | |
typedef struct _NvOSD_FrameArrowParams | NvOSD_FrameArrowParams |
Holds information about the arrows in a frame. More... | |
typedef struct _NvOSD_FrameCircleParams | NvOSD_FrameCircleParams |
Holds information about the circles in a frame. More... | |
Functions | |
NvOSDCtxHandle | nvll_osd_create_context (void) |
Creates an NvOSD context. More... | |
void | nvll_osd_destroy_context (NvOSDCtxHandle nvosd_ctx) |
Destroys an NvOSD context. More... | |
void | nvll_osd_set_clock_params (NvOSDCtxHandle nvosd_ctx, NvOSD_TextParams *clk_params) |
Sets clock parameters for a given context. More... | |
int | nvll_osd_put_text (NvOSDCtxHandle nvosd_ctx, NvOSD_FrameTextParams *frame_text_params) |
/brief Overlays clock and given text at a given location in a buffer. More... | |
int | nvll_osd_draw_segment_masks (NvOSDCtxHandle nvosd_ctx, NvOSD_FrameSegmentMaskParams *frame_mask_params) |
Overlays segment masks at a given location in a buffer. More... | |
int | nvll_osd_draw_rectangles (NvOSDCtxHandle nvosd_ctx, NvOSD_FrameRectParams *frame_rect_params) |
Overlays boxes at a given location in a buffer. More... | |
int | nvll_osd_draw_lines (NvOSDCtxHandle nvosd_ctx, NvOSD_FrameLineParams *frame_line_params) |
Overlays lines on the buffer. More... | |
int | nvll_osd_draw_arrows (NvOSDCtxHandle nvosd_ctx, NvOSD_FrameArrowParams *frame_arrow_params) |
Overlays arrows on the buffer. More... | |
int | nvll_osd_draw_circles (NvOSDCtxHandle nvosd_ctx, NvOSD_FrameCircleParams *frame_circle_params) |
Overlays circles on the buffer. More... | |
void * | nvll_osd_set_params (NvOSDCtxHandle nvosd_ctx, int width, int height) |
Sets the resolution of the frames on which the NvOSDContext is to operate. More... | |
int | nvll_osd_init_colors_for_hw_blend (void *nvosd_ctx, NvOSD_Color_info *color_info, int num_classes) |
Initializes colors for HW based blending. More... | |
#define MAX_BORDER_WIDTH 32 |
Definition at line 43 of file nvll_osd_api.h.
#define MAX_IN_BUF 16 |
Definition at line 42 of file nvll_osd_api.h.
#define NVOSD_PRINT_E | ( | f_, | |
... | |||
) | printf("libnvosd (%d):(ERROR) : " f_, __LINE__, ##__VA_ARGS__) |
Definition at line 39 of file nvll_osd_api.h.
typedef struct _NvOSD_FrameArrowParams NvOSD_FrameArrowParams |
Holds information about the arrows in a frame.
typedef struct _NvOSD_FrameCircleParams NvOSD_FrameCircleParams |
Holds information about the circles in a frame.
typedef struct _NvOSD_FrameLineParams NvOSD_FrameLineParams |
Holds information about the lines in a frame.
typedef struct _NvOSD_FrameRectParams NvOSD_FrameRectParams |
Holds information about the rectangles in a frame.
typedef struct _NvOSD_FrameSegmentMaskParams NvOSD_FrameSegmentMaskParams |
Holds information about the rectangles in a frame.
typedef struct _NvOSD_FrameTextParams NvOSD_FrameTextParams |
Holds information about the text in a frame.
typedef void* NvOSDCtxHandle |
Definition at line 50 of file nvll_osd_api.h.
NvOSDCtxHandle nvll_osd_create_context | ( | void | ) |
Creates an NvOSD context.
void nvll_osd_destroy_context | ( | NvOSDCtxHandle | nvosd_ctx | ) |
Destroys an NvOSD context.
[in] | nvosd_ctx | A handle for the NvOSD context to be destroyed. |
int nvll_osd_draw_arrows | ( | NvOSDCtxHandle | nvosd_ctx, |
NvOSD_FrameArrowParams * | frame_arrow_params | ||
) |
Overlays arrows on the buffer.
The length of arrow_params_list must equal num_arrows. The client is responsible for allocating this array.
[in] | nvosd_ctx | A handle for an NvOSD context. |
[in] | frame_arrow_params | A pointer to the FrameArrowParams struct containing arrow information to be overlayed. |
int nvll_osd_draw_circles | ( | NvOSDCtxHandle | nvosd_ctx, |
NvOSD_FrameCircleParams * | frame_circle_params | ||
) |
Overlays circles on the buffer.
You must ensure that the length of circle_params_list equals num_circles.
[in] | nvosd_ctx | A handle for an NvOSD context. |
[in] | frame_circle_params | A pointer to the FrameCircleParams struct containing circle information to be overlayed. |
int nvll_osd_draw_lines | ( | NvOSDCtxHandle | nvosd_ctx, |
NvOSD_FrameLineParams * | frame_line_params | ||
) |
Overlays lines on the buffer.
The length of line_params_list must be equal to num_lines. The client is responsible for allocating this array.
[in] | nvosd_ctx | A handle for an NvOSD context. |
[in] | frame_line_params | A pointer to the FrameLineParams struct containing line information to be overlayed. |
int nvll_osd_draw_rectangles | ( | NvOSDCtxHandle | nvosd_ctx, |
NvOSD_FrameRectParams * | frame_rect_params | ||
) |
Overlays boxes at a given location in a buffer.
Boxes can be configured with: a. Border only: Uou must set border_width and set has_bg_color to 0 for the given box. b. Border and background color To draw boxes with border and background color, you must set border_width and set has_bg_color to 1, and specify background color parameters for the given box. c. Solid fill acting as mask region To draw boxes with solid fill acting as mask region, you must set border_width to 0 and has_bg_color to 1 for the given box.
You must ensure that the length of rect_params_list is at least num_rects.
[in] | nvosd_ctx | A handle for an NvOSD context. |
[in] | frame_rect_params | A pointer to the FrameRectParams struct containing rectangles information to be overlayed. |
int nvll_osd_draw_segment_masks | ( | NvOSDCtxHandle | nvosd_ctx, |
NvOSD_FrameSegmentMaskParams * | frame_mask_params | ||
) |
Overlays segment masks at a given location in a buffer.
You must ensure that the length of mask_params_list is at least num_segments.
[in] | nvosd_ctx | A handle for an NvOSD context. |
[in] | frame_mask_params | A pointer to the FrameSegmentMaskParams struct containing mask information to be overlayed. |
int nvll_osd_init_colors_for_hw_blend | ( | void * | nvosd_ctx, |
NvOSD_Color_info * | color_info, | ||
int | num_classes | ||
) |
Initializes colors for HW based blending.
Applicable ONLY for Jetson.
[in] | nvosd_ctx | A pointer to NvOSD context. |
[in] | color_info | A pointer to the Color_info struct containing color information. |
[in] | num_classes | Number of classes. |
int nvll_osd_put_text | ( | NvOSDCtxHandle | nvosd_ctx, |
NvOSD_FrameTextParams * | frame_text_params | ||
) |
/brief Overlays clock and given text at a given location in a buffer.
To overlay the clock, you must call nvll_osd_set_clock_params(). You must also ensure that the length of text_params_list is at least NvOSD_FrameTextParams::num_strings.
[in] | nvosd_ctx | A handle for an NvOSD context. |
[in] | frame_text_params | A pointer to a structure containing information about rectangles to be overlayed. |
void nvll_osd_set_clock_params | ( | NvOSDCtxHandle | nvosd_ctx, |
NvOSD_TextParams * | clk_params | ||
) |
Sets clock parameters for a given context.
The clock is overlayed when nvll_osd_put_text() is called. If no other text is to be overlayed, nvll_osd_put_text() must be called with num_strings as 0 and text_params_list as NULL.
[in] | nvosd_ctx | A handle for an NvOSD context. |
[in] | clk_params | A pointer to a structure for the clock to be overlayed; NULL to disable the clock. |
void* nvll_osd_set_params | ( | NvOSDCtxHandle | nvosd_ctx, |
int | width, | ||
int | height | ||
) |
Sets the resolution of the frames on which the NvOSDContext is to operate.
[in] | nvosd_ctx | A handle for the NvOSD context. |
[in] | width | Width of the input frames. |
[in] | height | Height of the input frames. |