libstp
Robotics library for Botball
Loading...
Searching...
No Matches
CamSensor.hpp
Go to the documentation of this file.
1//
2// CamSensor - subscribes to raccoon cam_detections_t and provides query API.
3//
4
5#pragma once
6
7#include <memory>
8#include <string>
9#include <vector>
10
11namespace libstp::cam {
12
21 class CamSensor {
22 public:
25
26 CamSensor(const CamSensor&) = delete;
27 CamSensor& operator=(const CamSensor&) = delete;
28
29 // ---- Detection queries (from latest cam_detections_t) ----
30
32 bool isDetected(const std::string& label) const;
33
35 float getBlobX(const std::string& label) const;
37 float getBlobY(const std::string& label) const;
39 float getBlobWidth(const std::string& label) const;
41 float getBlobHeight(const std::string& label) const;
43 int getBlobArea(const std::string& label) const;
45 float getConfidence(const std::string& label) const;
46
48 std::vector<std::string> getDetectedLabels() const;
49
50 // ---- Frame dimensions ----
51
52 int getFrameWidth() const;
53 int getFrameHeight() const;
54
55 private:
56 struct Impl;
57 std::unique_ptr<Impl> pImpl;
58 };
59
60} // namespace libstp::cam
CamSensor & operator=(const CamSensor &)=delete
bool isDetected(const std::string &label) const
std::vector< std::string > getDetectedLabels() const
float getBlobHeight(const std::string &label) const
CamSensor(const CamSensor &)=delete
float getBlobY(const std::string &label) const
float getBlobX(const std::string &label) const
int getFrameWidth() const
int getBlobArea(const std::string &label) const
float getConfidence(const std::string &label) const
int getFrameHeight() const
float getBlobWidth(const std::string &label) const