vision

package
v0.3.0-beta Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseTemplateCache

func CloseTemplateCache()

func EmptyMask

func EmptyMask() gocv.Mat

EmptyMask returns a shared valid (non-nil) empty cv::Mat for use as the mask argument of cv::matchTemplate. Never close the returned Mat.

func GetMat

func GetMat(rows, cols int, matType gocv.MatType) gocv.Mat

func GetMatFrom

func GetMatFrom(src gocv.Mat) gocv.Mat

func GetScaledTemplates

func GetScaledTemplates(name string, template gocv.Mat, minScale, maxScale float64, steps int) []gocv.Mat

func MatchTemplateBest

func MatchTemplateBest(screen, template gocv.Mat, threshold float32) (image.Point, float64, error)

func MatchTemplateRegion

func MatchTemplateRegion(screen, template gocv.Mat, rect image.Rectangle, threshold float32) (image.Point, float64, error)

func PixelSearch

func PixelSearch(screen gocv.Mat, rect image.Rectangle, r, g, b int, tolerance int) (image.Point, error)

func PutMat

func PutMat(mat gocv.Mat)

func ResizeToHeight

func ResizeToHeight(src gocv.Mat, targetHeight int) gocv.Mat

Types

type MatPool

type MatPool struct {
	// contains filtered or unexported fields
}

func NewMatPool

func NewMatPool() *MatPool

func (*MatPool) Get

func (p *MatPool) Get(rows, cols int, matType gocv.MatType) gocv.Mat

func (*MatPool) GetFromPool

func (p *MatPool) GetFromPool(src gocv.Mat) gocv.Mat

func (*MatPool) Put

func (p *MatPool) Put(mat gocv.Mat)

type Match

type Match struct {
	Point      image.Point
	Confidence float64
	Scale      float64
}

func MatchMultiScale

func MatchMultiScale(screen, template gocv.Mat, minScale, maxScale float64, steps int, threshold float32) ([]Match, error)

func MatchMultiScaleAllROICached

func MatchMultiScaleAllROICached(screen, template gocv.Mat, templateName string, minScale, maxScale float64, steps int, threshold float32, roi image.Rectangle) ([]Match, error)

func MatchMultiScaleROI

func MatchMultiScaleROI(screen, template gocv.Mat, minScale, maxScale float64, steps int, threshold float32, roi image.Rectangle) ([]Match, error)

func MatchMultiScaleROICached

func MatchMultiScaleROICached(screen, template gocv.Mat, templateName string, minScale, maxScale float64, steps int, threshold float32, roi image.Rectangle) ([]Match, error)

func MatchTemplate

func MatchTemplate(screen, template gocv.Mat, threshold float32) ([]Match, error)

type ScaledTemplateCache

type ScaledTemplateCache struct {
	// contains filtered or unexported fields
}

func NewScaledTemplateCache

func NewScaledTemplateCache() *ScaledTemplateCache

func (*ScaledTemplateCache) Close

func (c *ScaledTemplateCache) Close()

func (*ScaledTemplateCache) GetOrBuild

func (c *ScaledTemplateCache) GetOrBuild(name string, template gocv.Mat, minScale, maxScale float64, steps int) []gocv.Mat

Jump to

Keyboard shortcuts

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