Documentation ¶
Overview ¶
Example (Basic) ¶
package main import ( "fmt" "github.com/koeng101/apriltag" "image/png" "os" ) func main() { detector := apriltag.New() f, _ := os.Open("testtags.png") img, _ := png.Decode(f) findings := detector.Find(apriltag.ImgToGrayscale(img)) fmt.Println(findings[0].Corners) }
Output: [[3.874999999998289 88.91883850097827] [83.87499999999712 88.8625869750948] [83.87500000000203 9.199375152585876] [3.8750000000025526 8.799375534060175]]
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DrawFindings ¶
func DrawFindings(img WritableImage, findings []Finding, centerColor, cornerColor color.Color)
DrawFindings draws all found apriltags on the provided image.
Types ¶
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
Detector encapsulates an apriltag detector initialized with a tag family.
type Finding ¶
type Finding struct { // The decoded ID of the tag ID int // The number of error bits that were corrected. Hamming int Goodness float32 // A measure of the quality of the binary decoding process. Higher == better. DecisionMargin float32 // Centeroid of the detected tag CenterX float64 CenterY float64 // Bounding edges of the detected tag. [0] = X, [1] = Y. Corners [4][2]float64 }
Finding represents a single apriltag detected in an image.
Click to show internal directories.
Click to hide internal directories.