|
libstp
Robotics library for Botball
|
#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 |
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.
| libstp::cam::CamSensor::CamSensor | ( | ) |
| libstp::cam::CamSensor::~CamSensor | ( | ) |
|
delete |
| int libstp::cam::CamSensor::getBlobArea | ( | const std::string & | label | ) | const |
Area in pixels of the first blob matching label.
| float libstp::cam::CamSensor::getBlobHeight | ( | const std::string & | label | ) | const |
Height of the first blob matching label (normalised 0-1).
| float libstp::cam::CamSensor::getBlobWidth | ( | const std::string & | label | ) | const |
Width of the first blob matching label (normalised 0-1).
| float libstp::cam::CamSensor::getBlobX | ( | const std::string & | label | ) | const |
Centre-x of the first blob matching label (normalised 0-1).
| float libstp::cam::CamSensor::getBlobY | ( | const std::string & | label | ) | const |
Centre-y of the first blob matching label (normalised 0-1).
| float libstp::cam::CamSensor::getConfidence | ( | const std::string & | label | ) | const |
Detection confidence of the first blob matching label (0-1).
| std::vector< std::string > libstp::cam::CamSensor::getDetectedLabels | ( | ) | const |
Return all labels present in the latest detection frame.
| int libstp::cam::CamSensor::getFrameHeight | ( | ) | const |
| int libstp::cam::CamSensor::getFrameWidth | ( | ) | const |
| bool libstp::cam::CamSensor::isDetected | ( | const std::string & | label | ) | const |
Return true if at least one blob with the given label was detected.