WPILibC++ 2024.3.2
|
An AprilTag detector engine. More...
#include <frc/apriltag/AprilTagDetector.h>
Classes | |
struct | Config |
Detector configuration. More... | |
struct | QuadThresholdParameters |
Quad threshold parameters. More... | |
class | Results |
Array of detection results. More... | |
Public Member Functions | |
AprilTagDetector () | |
~AprilTagDetector () | |
AprilTagDetector (const AprilTagDetector &)=delete | |
AprilTagDetector & | operator= (const AprilTagDetector &)=delete |
AprilTagDetector (AprilTagDetector &&rhs) | |
AprilTagDetector & | operator= (AprilTagDetector &&rhs) |
Results | Detect (int width, int height, int stride, uint8_t *buf) |
Detect tags from an 8-bit image. More... | |
Results | Detect (int width, int height, uint8_t *buf) |
Detect tags from an 8-bit image. More... | |
Configuration functions | |
void | SetConfig (const Config &config) |
Sets detector configuration. More... | |
Config | GetConfig () const |
Gets detector configuration. More... | |
void | SetQuadThresholdParameters (const QuadThresholdParameters ¶ms) |
Sets quad threshold parameters. More... | |
QuadThresholdParameters | GetQuadThresholdParameters () const |
Gets quad threshold parameters. More... | |
Tag family functions | |
bool | AddFamily (std::string_view fam, int bitsCorrected=2) |
Adds a family of tags to be detected. More... | |
void | RemoveFamily (std::string_view fam) |
Removes a family of tags from the detector. More... | |
void | ClearFamilies () |
Unregister all families. More... | |
An AprilTag detector engine.
This is expensive to set up and tear down, so most use cases should only create one of these, add a family to it, set up any other configuration, and repeatedly call Detect().
frc::AprilTagDetector::AprilTagDetector | ( | ) |
|
inline |
|
delete |
|
inline |
bool frc::AprilTagDetector::AddFamily | ( | std::string_view | fam, |
int | bitsCorrected = 2 |
||
) |
Adds a family of tags to be detected.
fam | Family name, e.g. "tag16h5" |
bitsCorrected | Maximum number of bits to correct |
void frc::AprilTagDetector::ClearFamilies | ( | ) |
Unregister all families.
Results frc::AprilTagDetector::Detect | ( | int | width, |
int | height, | ||
int | stride, | ||
uint8_t * | buf | ||
) |
Detect tags from an 8-bit image.
The image must be grayscale.
width | width of the image |
height | height of the image |
stride | number of bytes between image rows (often the same as width) |
buf | image buffer |
|
inline |
Detect tags from an 8-bit image.
The image must be grayscale.
width | width of the image |
height | height of the image |
buf | image buffer |
Config frc::AprilTagDetector::GetConfig | ( | ) | const |
Gets detector configuration.
QuadThresholdParameters frc::AprilTagDetector::GetQuadThresholdParameters | ( | ) | const |
Gets quad threshold parameters.
AprilTagDetector & frc::AprilTagDetector::operator= | ( | AprilTagDetector && | rhs | ) |
|
delete |
void frc::AprilTagDetector::RemoveFamily | ( | std::string_view | fam | ) |
Removes a family of tags from the detector.
fam | Family name, e.g. "tag16h5" |
void frc::AprilTagDetector::SetConfig | ( | const Config & | config | ) |
Sets detector configuration.
config | Configuration |
void frc::AprilTagDetector::SetQuadThresholdParameters | ( | const QuadThresholdParameters & | params | ) |
Sets quad threshold parameters.
params | Parameters |