digitgen

package
v0.0.0-...-dfde813 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2016 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ImageSize = 28

Variables

View Source
var (
	TestFile  = path.Join(outDir, "digit_test.dat")
	TrainFile = path.Join(outDir, "digit_train.dat")
)
View Source
var ErrFont = errors.New("Font issue")
View Source
var ErrNoText = errors.New("Text missing")
View Source
var ErrSize = errors.New("Char to big")

Functions

func GeneratDigits

func GeneratDigits(text string) error

Types

type CharInfo

type CharInfo struct {
	Char  string
	Type  FType
	Train bool
}

type Counter

type Counter struct {
	Image
	ID int
}

type DrawDirections

type DrawDirections struct {
	CharInfo
	FontName string
	FontSize float64
	Dx       float64
	Dy       float64
}

type FType

type FType uint8
const (
	FTypeMachine FType = 1 << iota
	FTypeHand
	FTypeTrueHand
)

type Image

type Image struct {
	CharInfo
	Image image.Image
}

type Record

type Record struct {
	Pic  [ImageSize * ImageSize]uint8
	Char string
	Type FType
}

Jump to

Keyboard shortcuts

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