libstp
Robotics library for Botball
Loading...
Searching...
No Matches
libstp::cam::CamSensor Class Reference

#include <CamSensor.hpp>

Public Member Functions

 CamSensor ()
 ~CamSensor ()
 CamSensor (const CamSensor &)=delete
CamSensor & operator= (const CamSensor &)=delete
bool isDetected (const std::string &label) const
float getBlobX (const std::string &label) const
float getBlobY (const std::string &label) const
float getBlobWidth (const std::string &label) const
float getBlobHeight (const std::string &label) const
int getBlobArea (const std::string &label) const
float getConfidence (const std::string &label) const
std::vector< std::string > getDetectedLabels () const
int getFrameWidth () const
int getFrameHeight () const

Detailed Description

Receives colour-blob detections published by raccoon-cam over LCM and exposes a simple query interface.

The constructor starts a background receive thread that keeps an internal cache of the latest cam_detections_t message. All public query methods are thread-safe.

Definition at line 21 of file CamSensor.hpp.

Constructor & Destructor Documentation

◆ CamSensor() [1/2]

libstp::cam::CamSensor::CamSensor ( )

◆ ~CamSensor()

libstp::cam::CamSensor::~CamSensor ( )

◆ CamSensor() [2/2]

libstp::cam::CamSensor::CamSensor ( const CamSensor & )
delete

Member Function Documentation

◆ getBlobArea()

int libstp::cam::CamSensor::getBlobArea ( const std::string & label) const

Area in pixels of the first blob matching label.

◆ getBlobHeight()

float libstp::cam::CamSensor::getBlobHeight ( const std::string & label) const

Height of the first blob matching label (normalised 0-1).

◆ getBlobWidth()

float libstp::cam::CamSensor::getBlobWidth ( const std::string & label) const

Width of the first blob matching label (normalised 0-1).

◆ getBlobX()

float libstp::cam::CamSensor::getBlobX ( const std::string & label) const

Centre-x of the first blob matching label (normalised 0-1).

◆ getBlobY()

float libstp::cam::CamSensor::getBlobY ( const std::string & label) const

Centre-y of the first blob matching label (normalised 0-1).

◆ getConfidence()

float libstp::cam::CamSensor::getConfidence ( const std::string & label) const

Detection confidence of the first blob matching label (0-1).

◆ getDetectedLabels()

std::vector< std::string > libstp::cam::CamSensor::getDetectedLabels ( ) const

Return all labels present in the latest detection frame.

◆ getFrameHeight()

int libstp::cam::CamSensor::getFrameHeight ( ) const

◆ getFrameWidth()

int libstp::cam::CamSensor::getFrameWidth ( ) const

◆ isDetected()

bool libstp::cam::CamSensor::isDetected ( const std::string & label) const

Return true if at least one blob with the given label was detected.

◆ operator=()

CamSensor & libstp::cam::CamSensor::operator= ( const CamSensor & )
delete

The documentation for this class was generated from the following file:
  • /home/runner/work/raccoon-lib/raccoon-lib/modules/libstp-cam/include/CamSensor.hpp