A detection of an AprilTag tag.
More...
#include <frc/apriltag/AprilTagDetection.h>
|
| AprilTagDetection ()=delete |
|
| AprilTagDetection (const AprilTagDetection &)=delete |
|
AprilTagDetection & | operator= (const AprilTagDetection &)=delete |
|
std::string_view | GetFamily () const |
| Gets the decoded tag's family name. More...
|
|
int | GetId () const |
| Gets the decoded ID of the tag. More...
|
|
int | GetHamming () const |
| Gets how many error bits were corrected. More...
|
|
float | GetDecisionMargin () const |
| Gets a measure of the quality of the binary decoding process: the average difference between the intensity of a data bit versus the decision threshold. More...
|
|
std::span< const double, 9 > | GetHomography () const |
| Gets the 3x3 homography matrix describing the projection from an "ideal" tag (with corners at (-1,1), (1,1), (1,-1), and (-1, -1)) to pixels in the image. More...
|
|
Eigen::Matrix3d | GetHomographyMatrix () const |
| Gets the 3x3 homography matrix describing the projection from an "ideal" tag (with corners at (-1,1), (1,1), (1,-1), and (-1, -1)) to pixels in the image. More...
|
|
const Point & | GetCenter () const |
| Gets the center of the detection in image pixel coordinates. More...
|
|
const Point & | GetCorner (int ndx) const |
| Gets a corner of the tag in image pixel coordinates. More...
|
|
std::span< double, 8 > | GetCorners (std::span< double, 8 > cornersBuf) const |
| Gets the corners of the tag in image pixel coordinates. More...
|
|
A detection of an AprilTag tag.
◆ AprilTagDetection() [1/2]
frc::AprilTagDetection::AprilTagDetection |
( |
| ) |
|
|
delete |
◆ AprilTagDetection() [2/2]
◆ GetCenter()
const Point & frc::AprilTagDetection::GetCenter |
( |
| ) |
const |
|
inline |
Gets the center of the detection in image pixel coordinates.
- Returns
- Center point
◆ GetCorner()
const Point & frc::AprilTagDetection::GetCorner |
( |
int |
ndx | ) |
const |
|
inline |
Gets a corner of the tag in image pixel coordinates.
These always wrap counter-clock wise around the tag. Index 0 is the bottom left corner.
- Parameters
-
ndx | Corner index (range is 0-3, inclusive) |
- Returns
- Corner point
◆ GetCorners()
std::span< double, 8 > frc::AprilTagDetection::GetCorners |
( |
std::span< double, 8 > |
cornersBuf | ) |
const |
|
inline |
Gets the corners of the tag in image pixel coordinates.
These always wrap counter-clock wise around the tag. The first set of corner coordinates are the coordinates for the bottom left corner.
- Parameters
-
cornersBuf | Corner point array (X and Y for each corner in order) |
- Returns
- Corner point array (copy of cornersBuf span)
◆ GetDecisionMargin()
float frc::AprilTagDetection::GetDecisionMargin |
( |
| ) |
const |
|
inline |
Gets a measure of the quality of the binary decoding process: the average difference between the intensity of a data bit versus the decision threshold.
Higher numbers roughly indicate better decodes. This is a reasonable measure of detection accuracy only for very small tags– not effective for larger tags (where we could have sampled anywhere within a bit cell and still gotten a good detection.)
- Returns
- Decision margin
◆ GetFamily()
Gets the decoded tag's family name.
- Returns
- Decoded family name
◆ GetHamming()
int frc::AprilTagDetection::GetHamming |
( |
| ) |
const |
|
inline |
Gets how many error bits were corrected.
Note: accepting large numbers of corrected errors leads to greatly increased false positive rates. NOTE: As of this implementation, the detector cannot detect tags with a hamming distance greater than 2.
- Returns
- Hamming distance (number of corrected error bits)
◆ GetHomography()
std::span< const double, 9 > frc::AprilTagDetection::GetHomography |
( |
| ) |
const |
Gets the 3x3 homography matrix describing the projection from an "ideal" tag (with corners at (-1,1), (1,1), (1,-1), and (-1, -1)) to pixels in the image.
- Returns
- Homography matrix data
◆ GetHomographyMatrix()
Eigen::Matrix3d frc::AprilTagDetection::GetHomographyMatrix |
( |
| ) |
const |
Gets the 3x3 homography matrix describing the projection from an "ideal" tag (with corners at (-1,1), (1,1), (1,-1), and (-1, -1)) to pixels in the image.
- Returns
- Homography matrix
◆ GetId()
int frc::AprilTagDetection::GetId |
( |
| ) |
const |
|
inline |
Gets the decoded ID of the tag.
- Returns
- Decoded ID
◆ operator=()
The documentation for this class was generated from the following file: