match

package
v0.9.4-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IdentifyBalls

func IdentifyBalls(mat gocv.Mat, points int) (image.Image, error)

func IdentifyTime

func IdentifyTime(mat gocv.Mat, kitchen string) (image.Image, error)

func Matches

func Matches(matrix gocv.Mat, img image.Image, t []template.Template) (*Match, Result, int)

func Time

func Time(matrix gocv.Mat, img *image.RGBA) (seconds int, kitchen string)

Types

type Goals

type Goals struct {
	Purple Tiers
	Orange Tiers
}

type Map

type Map struct {
	Goals
	Objectives
}

func MiniMap

func MiniMap(matrix gocv.Mat, img *image.RGBA) (Map, bool)

type Match

type Match struct {
	image.Point
	template.Template
	Max image.Point
}

func (*Match) Identify

func (m *Match) Identify(mat gocv.Mat, points int) (image.Image, error)

func (*Match) MarshalZerologObject

func (m *Match) MarshalZerologObject(e *zerolog.Event)

type Objectives

type Objectives struct {
	Top    bool
	Bottom bool
}

type Result

type Result int
const (
	Duplicate Result = -3
	Invalid   Result = -2
	Missed    Result = -1
	NotFound  Result = 0
	Found     Result = 1
)

func Balls

func Balls(matrix gocv.Mat, img image.Image) (Result, []int, int)

func Balls2

func Balls2(matrix gocv.Mat, img image.Image) (Result, []int, int)

Balls2 avoids the walking inset method in Balls that fails for duplicate number values. Instead, it handles duplicate number values by drawing over matched areas.

func SelfScore

func SelfScore(matrix gocv.Mat, img image.Image) (Result, int)

func (Result) String

func (r Result) String() string

type Tier

type Tier struct {
	Destroyed bool
	image.Point
	Match float32
}

type Tier1

type Tier1 struct {
	Top    Tier
	Bottom Tier
}

type Tier2

type Tier2 struct {
	Top    Tier
	Bottom Tier
}

type Tier3

type Tier3 struct {
	Middle Tier
}

type Tiers

type Tiers struct {
	Tier1
	Tier2
	Tier3
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL