opencv_helper

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: MIT Imports: 8 Imported by: 3

README

OpenCV-Helper

基于 hybridgroup/gocv 实现的一个图像匹配辅助库。

安装

必须先安装好 OpenCV,安装步骤可参考 hybridgroup/gocv:

go get -u github.com/electricbubble/opencv-helper

Documentation

Index

Constants

View Source
const DefaultMatchMode = TmCcoeffNormed

Variables

This section is empty.

Functions

func Debug

func Debug(dm DebugMode)

func FindAllImageLocationsFromDisk

func FindAllImageLocationsFromDisk(source, search string, threshold float32, matchMode ...TemplateMatchMode) (locs []image.Point, err error)

func FindAllImageLocationsFromRaw

func FindAllImageLocationsFromRaw(source, search *bytes.Buffer, threshold float32, matchMode ...TemplateMatchMode) (locs []image.Point, err error)

func FindAllImageRectsFromDisk

func FindAllImageRectsFromDisk(source, search string, threshold float32, matchMode ...TemplateMatchMode) (rects []image.Rectangle, err error)

func FindAllImageRectsFromRaw

func FindAllImageRectsFromRaw(source, search *bytes.Buffer, threshold float32, matchMode ...TemplateMatchMode) (rects []image.Rectangle, err error)

func FindImageLocationFromDisk

func FindImageLocationFromDisk(source, search string, threshold float32, matchMode ...TemplateMatchMode) (loc image.Point, err error)

func FindImageLocationFromRaw

func FindImageLocationFromRaw(source, search *bytes.Buffer, threshold float32, matchMode ...TemplateMatchMode) (loc image.Point, err error)

func FindImageRectFromDisk

func FindImageRectFromDisk(source, search string, threshold float32, matchMode ...TemplateMatchMode) (rect image.Rectangle, err error)

func FindImageRectFromRaw

func FindImageRectFromRaw(source, search *bytes.Buffer, threshold float32, matchMode ...TemplateMatchMode) (rect image.Rectangle, err error)

Types

type DebugMode

type DebugMode int
const (
	// DmOff no output
	DmOff DebugMode = iota
	// DmEachMatch output matched and mismatched values
	DmEachMatch
	// DmNotMatch output only values that do not match
	DmNotMatch
)

type TemplateMatchMode

type TemplateMatchMode int

TemplateMatchMode is the type of the template matching operation.

const (
	// TmSqdiff maps to TM_SQDIFF
	TmSqdiff TemplateMatchMode = iota
	// TmSqdiffNormed maps to TM_SQDIFF_NORMED
	TmSqdiffNormed
	// TmCcorr maps to TM_CCORR
	TmCcorr
	// TmCcorrNormed maps to TM_CCORR_NORMED
	TmCcorrNormed
	// TmCcoeff maps to TM_CCOEFF
	TmCcoeff
	// TmCcoeffNormed maps to TM_CCOEFF_NORMED
	TmCcoeffNormed
)

Jump to

Keyboard shortcuts

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