alignment

package
v0.0.0-...-3f89074 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Manager = &manager{}

Functions

func CropImage

func CropImage(img *image.RGBA, crop *Crop) *image.RGBA

func DetectColor

func DetectColor(mat opencv.Mat, detector *Detector) bool

func DetectImage

func DetectImage(image *image.RGBA, detector *Detector) bool

func DetectObject

func DetectObject(mat opencv.Mat, detector *Detector) bool

func LuaCheckpoint

func LuaCheckpoint(L *lua.LState) int

func LuaExecuteWithAlignment

func LuaExecuteWithAlignment(L *lua.LState) int

Types

type Bitmap

type Bitmap struct {
	Name     string `bson:"name"`
	Variance int    `bson:"variance"`
}

type Color

type Color struct {
	UpperBound color.RGBA `bson:"upper_bound"`
	LowerBound color.RGBA `bson:"lower_bound"`
	Percentage int        `bson:"percentage"`
	Distance   float64    `bson:"threshold"`
	Variance   float64    `bson:"variance"`
}

type Crop

type Crop struct {
	X1 float64 `bson:"x1"`
	X2 float64 `bson:"x2"`
	Y1 float64 `bson:"y1"`
	Y2 float64 `bson:"y2"`
}

type Descriptor

type Descriptor struct {
	Rows int    `bson:"rows"`
	Cols int    `bson:"cols"`
	Type int    `bson:"type"`
	Data []byte `bson:"data"`
}

type Detector

type Detector struct {
	Quadrants []int `bson:"quadrants"`

	Descriptor *Descriptor `bson:"descriptor,omitempty"`
	Color      *Color      `bson:"color,omitempty"`
	Bitmap     *Bitmap     `bson:"bitmap,omitempty"`
	Parameters *Parameters `bson:"parameters,omitempty"`

	ZoomLevel int   `bson:"zoom_level"`
	RotPitch  int   `bson:"rot_pitch"` // Up, Down
	RotYaw    int   `bson:"rot_yaw"`   // Left, Right
	Crop      *Crop `bson:"crop,omitempty"`

	HalfWidth  bool `bson:"half_width"`
	MinMatches int  `bson:"min_matches"`

	Mat opencv.Mat
}

type DetectorFile

type DetectorFile struct {
	Version   string               `bson:"version"`
	Detectors map[string]*Detector `bson:"detectors"`
}

type Parameters

type Parameters struct {
	OctaveLayers      int     `bson:"octave_layers"`
	ContrastThreshold float64 `bson:"contrast_threshold"`
	EdgeThreshold     float64 `bson:"edge_threshold"`
	Sigma             float64 `bson:"sigma"`
}

func (*Parameters) SIFT

func (p *Parameters) SIFT() opencv.SIFT

Jump to

Keyboard shortcuts

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