samples

package
v0.0.0-...-2854290 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TargetWidth = 500.0
)

Variables

View Source
var BlackGoCV uint8 = 0
View Source
var Debug = false
View Source
var WhiteGoCV uint8 = 255

Functions

func ZhangSuen

func ZhangSuen(src gocv.Mat, dst *gocv.Mat)

Types

type GridConfig

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

func NewGridConfig

func NewGridConfig(sample *Sample, rows, cols uint16) GridConfig

func (*GridConfig) ColArea

func (gc *GridConfig) ColArea() float64

func (*GridConfig) ColRect

func (gc *GridConfig) ColRect(col int) image.Rectangle

func (*GridConfig) FieldArea

func (gc *GridConfig) FieldArea() float64

func (*GridConfig) FieldRect

func (gc *GridConfig) FieldRect(row, col int) image.Rectangle

func (GridConfig) GoString

func (gc GridConfig) GoString() string

func (*GridConfig) RowArea

func (gc *GridConfig) RowArea() float64

func (*GridConfig) RowRect

func (gc *GridConfig) RowRect(row int) image.Rectangle

type Sample

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

func NewSample

func NewSample(filename string) (*Sample, error)

func (*Sample) Area

func (sample *Sample) Area() int

func (*Sample) CenterOfMass

func (sample *Sample) CenterOfMass() image.Point

func (*Sample) Close

func (sample *Sample) Close()

func (*Sample) Copy

func (sample *Sample) Copy() *Sample

func (*Sample) Crop

func (sample *Sample) Crop()

func (*Sample) Empty

func (sample *Sample) Empty() bool

func (*Sample) Enlarge

func (sample *Sample) Enlarge(width int, height int, c *color.RGBA)

func (*Sample) Foreground

func (sample *Sample) Foreground()

func (*Sample) GoString

func (sample *Sample) GoString() string

func (*Sample) Height

func (sample *Sample) Height() int

func (*Sample) Histogram

func (sample *Sample) Histogram(dir, filename string, bins int) error

func (*Sample) Load

func (sample *Sample) Load(mat gocv.Mat)

func (*Sample) Mat

func (sample *Sample) Mat() gocv.Mat

func (*Sample) MatType

func (sample *Sample) MatType() gocv.MatType

func (*Sample) Normalize

func (sample *Sample) Normalize()

func (*Sample) Preprocess

func (sample *Sample) Preprocess(ratio float64)

func (*Sample) Ratio

func (sample *Sample) Ratio() float64

func (*Sample) Resize

func (sample *Sample) Resize(width int, ratio float64)

func (*Sample) Save

func (sample *Sample) Save(dir, filename string, show bool) string

func (*Sample) ToLines

func (sample *Sample) ToLines()

func (*Sample) Update

func (sample *Sample) Update()

func (*Sample) Width

func (sample *Sample) Width() int

func (*Sample) ZhangSuen

func (sample *Sample) ZhangSuen()

type SampleGrid

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

func NewSampleGrid

func NewSampleGrid(sample *Sample, rows, cols uint16) *SampleGrid

func (*SampleGrid) At

func (sg *SampleGrid) At(row, col int) *Sample

func (*SampleGrid) Config

func (sg *SampleGrid) Config() *GridConfig

func (SampleGrid) GoString

func (sg SampleGrid) GoString() string

func (*SampleGrid) Save

func (sg *SampleGrid) Save(dir, filename string, show bool)

type UserSample

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

func NewUserSample

func NewUserSample(username, filename string) (*UserSample, error)

func (*UserSample) Close

func (s *UserSample) Close()

func (*UserSample) Copy

func (s *UserSample) Copy() *UserSample

func (*UserSample) Preprocess

func (s *UserSample) Preprocess()

func (*UserSample) Sample

func (s *UserSample) Sample() *Sample

func (*UserSample) Save

func (s *UserSample) Save(dir, filename string, show bool)

Jump to

Keyboard shortcuts

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