VART-X  0.3.0
vart::Overlay Class Reference

This module facilitates the overlay of annotations onto the video frame, currently overlay utilizes OpenCV library to draw on frames, which is software based. Overlay supports drawing of bounding boxes, text, lines, arrows, circles and polygons on frames. Application can also incorporate custom implementation using base class. More...

#include <vart_overlay.hpp>

Public Member Functions

 Overlay ()=delete
 
 Overlay (OverlayImplType overlay_impl_type, std::shared_ptr< Device > device)
 Overlay() - Constructor for creating an overlay instance, which accepts input type and device instance parameters. More...
 
 Overlay (std::shared_ptr< OverlayImplBase > ptr)
 Overlay() - Constructor for creating an overlay instance, which accepts user defined pimpl parameters. More...
 
const std::shared_ptr< OverlayImplBase > & get_pimpl_handle () const
 get_pimpl_handle() - Retrieves pointer to implementation class. More...
 
void draw_overlay (VideoFrame &frame, OverlayShapeInfo &shape_info)
 draw_overlay() - Draws the input overlay information on to the frame More...
 

Detailed Description

This module facilitates the overlay of annotations onto the video frame, currently overlay utilizes OpenCV library to draw on frames, which is software based. Overlay supports drawing of bounding boxes, text, lines, arrows, circles and polygons on frames. Application can also incorporate custom implementation using base class.

See also
OverlayImplBase

Constructor & Destructor Documentation

◆ Overlay() [1/3]

vart::Overlay::Overlay ( )
delete

◆ Overlay() [2/3]

vart::Overlay::Overlay ( OverlayImplType  overlay_impl_type,
std::shared_ptr< Device device 
)

Overlay() - Constructor for creating an overlay instance, which accepts input type and device instance parameters.

Parameters
[in]overlay_impl_typeEnum class to specify which type of overlay implementation to use. Only OverlayImplType::OPENCV is currently supported.
[in]deviceDevice handle. Must be non-null. See vart::Device for more details.

◆ Overlay() [3/3]

vart::Overlay::Overlay ( std::shared_ptr< OverlayImplBase ptr)

Overlay() - Constructor for creating an overlay instance, which accepts user defined pimpl parameters.

Parameters
[in]ptrPointer to user's implementation instance

Member Function Documentation

◆ draw_overlay()

void vart::Overlay::draw_overlay ( VideoFrame frame,
OverlayShapeInfo shape_info 
)

draw_overlay() - Draws the input overlay information on to the frame

Parameters
[in,out]frameVideo frame on which drawing operation to be performed.
[in]shape_infoInformation used in the drawing operation. Read-only despite the signature taking a non-const reference; the OpenCV backend does not mutate the supplied OverlayShapeInfo.

◆ get_pimpl_handle()

const std::shared_ptr<OverlayImplBase>& vart::Overlay::get_pimpl_handle ( ) const

get_pimpl_handle() - Retrieves pointer to implementation class.

Returns
Constant reference to the pimpl. Non-null when the Overlay was constructed via the type-enum constructor; for the pimpl constructor it is only non-null if the caller supplied a non-null pointer.

The documentation for this class was generated from the following file: