PiImageStreamer
Loading...
Searching...
No Matches
SWE4211RPi::AbstractImageOverlay Class Referenceabstract

#include <AbstractImageOverlay.h>

Inheritance diagram for SWE4211RPi::AbstractImageOverlay:

Public Member Functions

 AbstractImageOverlay ()
 
virtual ~AbstractImageOverlay ()
 
virtual void applyOverlay (cv::Mat *image)=0
 
virtual void applyScaledOverlay (cv::Mat *image)=0
 
long getOverlaySerialNumber ()
 

Private Attributes

long overlaySerialNumber
 

Static Private Attributes

static std::atomic< long > serialCounter = {0}
 

Detailed Description

This is the abstract base class for all image overlays.

Constructor & Destructor Documentation

◆ AbstractImageOverlay()

AbstractImageOverlay::AbstractImageOverlay ( )

This will construct a new overlay, assigning it the next serial number.

◆ ~AbstractImageOverlay()

AbstractImageOverlay::~AbstractImageOverlay ( )
virtual

This is the destructor for the class.

Member Function Documentation

◆ applyOverlay()

virtual void SWE4211RPi::AbstractImageOverlay::applyOverlay ( cv::Mat *  image)
pure virtual

This method will draw the overlay onto the given image, using the overlay's original coordinates.

Parameters
imageThis is the image that the overlay is to be drawn on.

Implemented in SWE4211RPi::ContourOverlay.

◆ applyScaledOverlay()

virtual void SWE4211RPi::AbstractImageOverlay::applyScaledOverlay ( cv::Mat *  image)
pure virtual

This method will draw the overlay onto the given image, scaling the overlay's coordinates to match the size of the image.

Parameters
imageThis is the image that the overlay is to be drawn on.

Implemented in SWE4211RPi::ContourOverlay.

◆ getOverlaySerialNumber()

long AbstractImageOverlay::getOverlaySerialNumber ( )

This method will return the unique serial number of this overlay.

Returns
The serial number of this overlay.

Member Data Documentation

◆ overlaySerialNumber

long SWE4211RPi::AbstractImageOverlay::overlaySerialNumber
private

This is the unique serial number of this overlay. The first overlay created is given 1.

◆ serialCounter

std::atomic< long > AbstractImageOverlay::serialCounter = {0}
staticprivate

This is the count of overlays created so far. It is shared by all overlays and is used to assign each new overlay its serial number. It is atomic so that overlays can be created safely from multiple threads.

This is the count of overlays created so far. It starts at 0, so the first overlay is given serial number 1.


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