classer

package
v3.0.0-...-a89b480 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxConnCompWidth = 350
	MaxCharCompWidth = 350
	MaxWordCompWidth = 1000
	MaxCompHeight    = 120
)
View Source
const (
	MaxDiffWidth  = 2
	MaxDiffHeight = 2
)
View Source
const JbAddedPixels = 6

Variables

View Source
var TwoByTwoWalk = []int{0, 0, 0, 1, -1, 0, 0, -1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, 0, -2, 2, 0, 0, 2, -2, 0, -1, -2, 1, -2, 2, -1, 2, 1, 1, 2, -1, 2, -2, 1, -2, -1, -2, -2, 2, -2, 2, 2, -2, 2}

Functions

This section is empty.

Types

type Classer

type Classer struct {
	BaseIndex               int
	Settings                Settings
	ComponentsNumber        *_af.IntSlice
	TemplateAreas           *_af.IntSlice
	Widths                  map[int]int
	Heights                 map[int]int
	NumberOfClasses         int
	ClassInstances          *_eb.BitmapsArray
	UndilatedTemplates      *_eb.Bitmaps
	DilatedTemplates        *_eb.Bitmaps
	TemplatesSize           _af.IntsMap
	FgTemplates             *_af.NumSlice
	CentroidPoints          *_eb.Points
	CentroidPointsTemplates *_eb.Points
	ClassIDs                *_af.IntSlice
	ComponentPageNumbers    *_af.IntSlice
	PtaUL                   *_eb.Points
	PtaLL                   *_eb.Points
}

func Init

func Init(settings Settings) (*Classer, error)

func (*Classer) AddPage

func (_ab *Classer) AddPage(inputPage *_eb.Bitmap, pageNumber int, method Method) (_aa error)

func (*Classer) ComputeLLCorners

func (_d *Classer) ComputeLLCorners() (_gb error)

type Method

type Method int
const (
	RankHaus Method = iota
	Correlation
)

type Settings

type Settings struct {
	MaxCompWidth       int
	MaxCompHeight      int
	SizeHaus           int
	RankHaus           float64
	Thresh             float64
	WeightFactor       float64
	KeepClassInstances bool
	Components         _eb.Component
	Method             Method
}

func DefaultSettings

func DefaultSettings() Settings

func (*Settings) SetDefault

func (_ddcb *Settings) SetDefault()

func (Settings) Validate

func (_bge Settings) Validate() error

Jump to

Keyboard shortcuts

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