Documentation ¶
Index ¶
- func CatmullRom(a, b, c, d uint8, x float64) uint8
- func FindTransform(sources, dests []FPoint) []float64
- func ImageBiCatrom(im image.Image, x, y float64) color.RGBA
- func YBiCatrom(im *image.YCbCr, x, y float64) uint8
- type AffineTransform
- type BubblesJson
- type Contest
- type ContestSelections
- type DrawSettings
- type FPoint
- type MatrixTransform
- type Scanner
- func (s *Scanner) DebugOrigBubbles(outpath string) error
- func (s *Scanner) ProcessScannedImage(im image.Image) (marked map[string]map[string]bool, err error)
- func (s *Scanner) ReadBubblesJson(path string) error
- func (s *Scanner) ReadOrigImage(origname string) error
- func (s *Scanner) ReadScannedImage(fname string) (marked map[string]map[string]bool, err error)
- func (s *Scanner) SetOrigImage(orig image.Image) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CatmullRom ¶
func FindTransform ¶
Types ¶
type AffineTransform ¶
type BubblesJson ¶
type BubblesJson struct { DrawSettings *DrawSettings `json:"draw_settings"` // Bubbles is a list per ballot style, indexed in the same order as the source document ballot styles. Bubbles []Contest `json:"bubbles"` }
type Contest ¶
type Contest map[string]ContestSelections
type ContestSelections ¶
{"csel1": [44.2, 491.4000000000001, 22.67716535433071, 8.255859375], "csel2": [44.2, 458.2000000000001, 22.67716535433071, 8.255859375]} []float64 is length 4, [x,y, width,height]
type DrawSettings ¶
type FPoint ¶
func FPointFromInt ¶
type MatrixTransform ¶
type MatrixTransform struct {
// contains filtered or unexported fields
}
func (MatrixTransform) Transform ¶
func (mt MatrixTransform) Transform(x, y float64) (float64, float64)
func (MatrixTransform) TransformInt ¶
func (mt MatrixTransform) TransformInt(x, y int) (int, int)
type Scanner ¶
type Scanner struct { Bj BubblesJson DebugOut io.Writer TargetsPngPath string DebugPngPath string BubblesPngPath string // contains filtered or unexported fields }
func (*Scanner) DebugOrigBubbles ¶
func (*Scanner) ProcessScannedImage ¶
func (*Scanner) ReadBubblesJson ¶
func (*Scanner) ReadOrigImage ¶
func (*Scanner) ReadScannedImage ¶
Click to show internal directories.
Click to hide internal directories.