Solar
Public Member Functions | List of all members
SolAR::MODULES::OPENCV::SolARMaskOverlayOpencv Class Reference

Draws masks on top of an image. UUID: ed445504-daba-4855-af88-052d4e3e5b7a More...

#include <SolARMaskOverlayOpencv.h>

Inheritance diagram for SolAR::MODULES::OPENCV::SolARMaskOverlayOpencv:
Inheritance graph
[legend]
Collaboration diagram for SolAR::MODULES::OPENCV::SolARMaskOverlayOpencv:
Collaboration graph
[legend]

Public Member Functions

org::bcom::xpcf::XPCFErrorCode onConfigured () override final
 
void unloadComponent () override
 
FrameworkReturnCode draw (SRef< SolAR::datastructure::Image > image, const std::vector< SolAR::datastructure::Rectanglei > &boxes, const std::vector< SRef< SolAR::datastructure::Image > > &masks, const std::vector< uint32_t > &classIds, const std::vector< float > &scores) override
 Draw masks on an image. More...
 
FrameworkReturnCode draw (SRef< SolAR::datastructure::Image > image, const SRef< SolAR::datastructure::Image > mask) override
 Draw masks on an image. More...
 

Detailed Description

Draws masks on top of an image. UUID: ed445504-daba-4855-af88-052d4e3e5b7a

Properties
m_classFile the path to class name file
type: string; default: ""
m_colorFile the path to the color file
type: string; default: ""

Member Function Documentation

◆ draw() [1/2]

FrameworkReturnCode SolAR::MODULES::OPENCV::SolARMaskOverlayOpencv::draw ( SRef< SolAR::datastructure::Image >  image,
const SRef< SolAR::datastructure::Image >  mask 
)
override

Draw masks on an image.

Parameters
[in,out]imageThe image on which the masks will be drawn.
[in]maskThe mask has same size as the input image, in which the value of each pixel is corresponding to the class id.
Returns
FrameworkReturnCode::SUCCESS if the draw succeed, else FrameworkReturnCode::_ERROR

◆ draw() [2/2]

FrameworkReturnCode SolAR::MODULES::OPENCV::SolARMaskOverlayOpencv::draw ( SRef< SolAR::datastructure::Image >  image,
const std::vector< SolAR::datastructure::Rectanglei > &  boxes,
const std::vector< SRef< SolAR::datastructure::Image > > &  masks,
const std::vector< uint32_t > &  classIds,
const std::vector< float > &  scores 
)
override

Draw masks on an image.

Parameters
[in,out]imageThe image on which the masks will be drawn.
[in]boxesThe bounding boxes of each detected object.
[in]masksThe binary masks corresponding to the bounding boxes. For each mask, regions with a value of 1 correspond to the object, otherwise the background.
[in]classIdsThe id of each object in the bounding box.
[in]scoresThe corresponding confidence scores.
Returns
FrameworkReturnCode::SUCCESS if the draw succeed, else FrameworkReturnCode::_ERROR

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