Versions in this module Expand all Collapse all v1 v1.2.0 Aug 8, 2023 v1.1.0 Aug 8, 2023 Changes in this version + func Blit(src *Bitmap, dst *Bitmap, x, y int, op CombinationOperator) error + func ClipBoxToRectangle(box *image.Rectangle, wi, hi int) (out *image.Rectangle, err error) + func CombineBytes(oldByte, newByte byte, op CombinationOperator) byte + func CorrelationScore(bm1, bm2 *Bitmap, area1, area2 int, delX, delY float32, maxDiffW, maxDiffH int, ...) (score float64, err error) + func CorrelationScoreSimple(bm1, bm2 *Bitmap, area1, area2 int, delX, delY float32, maxDiffW, maxDiffH int, ...) (score float64, err error) + func CorrelationScoreThresholded(bm1, bm2 *Bitmap, area1, area2 int, delX, delY float32, maxDiffW, maxDiffH int, ...) (bool, error) + func HausTest(p1, p2, p3, p4 *Bitmap, delX, delY float32, maxDiffW, maxDiffH int) (bool, error) + func MakePixelCentroidTab8() []int + func MakePixelSumTab8() []int + func RankHausTest(p1, p2, p3, p4 *Bitmap, delX, delY float32, ...) (match bool, err error) + func RasterOperation(dest *Bitmap, dx, dy, dw, dh int, op RasterOperator, src *Bitmap, sx, sy int) error + func Rect(x, y, w, h int) (*image.Rectangle, error) + func TstAddSymbol(t *testing.T, bms *Bitmaps, sym *Bitmap, x *int, y int, space int) + func TstFrameBitmapData() []byte + func TstImageBitmapData() []byte + func TstWriteSymbols(t *testing.T, bms *Bitmaps, src *Bitmap) + type Bitmap struct + BitmapNumber int + Color Color + Data []byte + Height int + RowStride int + Special int + Text string + Width int + XResolution int + YResolution int + func Copy(d, s *Bitmap) (*Bitmap, error) + func Dilate(d *Bitmap, s *Bitmap, sel *Selection) (*Bitmap, error) + func DilateBrick(d, s *Bitmap, hSize, vSize int) (*Bitmap, error) + func Extract(roi image.Rectangle, src *Bitmap) (*Bitmap, error) + func MorphSequence(src *Bitmap, sequence ...MorphProcess) (*Bitmap, error) + func New(width, height int) *Bitmap + func NewWithData(width, height int, data []byte) (*Bitmap, error) + func NewWithUnpaddedData(width, height int, data []byte) (*Bitmap, error) + func TstASymbol(t *testing.T) *Bitmap + func TstCSymbol(t *testing.T) *Bitmap + func TstDSymbol(t *testing.T, scale ...int) *Bitmap + func TstESymbol(t *testing.T, scale ...int) *Bitmap + func TstFrameBitmap() *Bitmap + func TstGetScaledSymbol(t *testing.T, sm *Bitmap, scale ...int) *Bitmap + func TstISymbol(t *testing.T, scale ...int) *Bitmap + func TstImageBitmap() *Bitmap + func TstNSymbol(t *testing.T, scale ...int) *Bitmap + func TstOSymbol(t *testing.T, scale ...int) *Bitmap + func TstPSymbol(t *testing.T) *Bitmap + func TstRSymbol(t *testing.T, scale ...int) *Bitmap + func TstTSymbol(t *testing.T, scale ...int) *Bitmap + func TstVSymbol(t *testing.T, scale ...int) *Bitmap + func TstWSymbol(t *testing.T, scale ...int) *Bitmap + func TstWordBitmap(t *testing.T, scale ...int) *Bitmap + func TstWordBitmapWithSpaces(t *testing.T, scale ...int) *Bitmap + func (b *Bitmap) AddBorder(borderSize, val int) (*Bitmap, error) + func (b *Bitmap) AddBorderGeneral(left, right, top, bot int, val int) (*Bitmap, error) + func (b *Bitmap) And(s *Bitmap) (d *Bitmap, err error) + func (b *Bitmap) ClipRectangle(box *image.Rectangle) (d *Bitmap, boxC *image.Rectangle, err error) + func (b *Bitmap) ConnComponents(bms *Bitmaps, connectivity int) (boxa *Boxes, err error) + func (b *Bitmap) Copy() *Bitmap + func (b *Bitmap) CountPixels() int + func (b *Bitmap) CreateTemplate() *Bitmap + func (b *Bitmap) Equals(s *Bitmap) bool + func (b *Bitmap) Equivalent(s *Bitmap) bool + func (b *Bitmap) GetBitOffset(x int) int + func (b *Bitmap) GetByte(index int) (byte, error) + func (b *Bitmap) GetByteIndex(x, y int) int + func (b *Bitmap) GetChocolateData() []byte + func (b *Bitmap) GetComponents(components Component, maxWidth, maxHeight int) (bitmaps *Bitmaps, boxes *Boxes, err error) + func (b *Bitmap) GetPixel(x, y int) bool + func (b *Bitmap) GetUnpaddedData() ([]byte, error) + func (b *Bitmap) GetVanillaData() []byte + func (b *Bitmap) InverseData() + func (b *Bitmap) RasterOperation(dx, dy, dw, dh int, op RasterOperator, src *Bitmap, sx, sy int) error + func (b *Bitmap) RemoveBorder(borderSize int) (*Bitmap, error) + func (b *Bitmap) RemoveBorderGeneral(left, right, top, bot int) (*Bitmap, error) + func (b *Bitmap) SetByte(index int, v byte) error + func (b *Bitmap) SetDefaultPixel() + func (b *Bitmap) SetPadBits(value int) + func (b *Bitmap) SetPixel(x, y int, pixel byte) error + func (b *Bitmap) SizesEqual(s *Bitmap) bool + func (b *Bitmap) String() string + func (b *Bitmap) ThresholdPixelSum(thresh int, tab8 []int) (above bool, err error) + func (b *Bitmap) ToImage() image.Image + func (b *Bitmap) Zero() bool + type Bitmaps struct + Boxes []*image.Rectangle + Values []*Bitmap + func (b *Bitmaps) AddBitmap(bm *Bitmap) + func (b *Bitmaps) AddBox(box *image.Rectangle) + func (b *Bitmaps) ClipToBitmap(s *Bitmap) (*Bitmaps, error) + func (b *Bitmaps) CountPixels() *basic.NumSlice + func (b *Bitmaps) GetBitmap(i int) (*Bitmap, error) + func (b *Bitmaps) GetBox(i int) (*image.Rectangle, error) + func (b *Bitmaps) GroupByHeight() (*BitmapsArray, error) + func (b *Bitmaps) GroupByWidth() (*BitmapsArray, error) + func (b *Bitmaps) HeightSorter() func(i, j int) bool + func (b *Bitmaps) SelectByIndexes(idx []int) (*Bitmaps, error) + func (b *Bitmaps) SelectBySize(width, height int, tp LocationFilter, relation SizeComparison) (d *Bitmaps, err error) + func (b *Bitmaps) Size() int + func (b *Bitmaps) SortByHeight() + func (b *Bitmaps) SortByWidth() + func (b *Bitmaps) String() string + func (b *Bitmaps) WidthSorter() func(i, j int) bool + type BitmapsArray struct + Boxes []*image.Rectangle + Values []*Bitmaps + func (b *BitmapsArray) AddBitmaps(bm *Bitmaps) + func (b *BitmapsArray) AddBox(box *image.Rectangle) + func (b *BitmapsArray) GetBitmaps(i int) (*Bitmaps, error) + func (b *BitmapsArray) GetBox(i int) (*image.Rectangle, error) + type BoundaryCondition int + const AsymmetricMorphBC + const SymmetricMorphBC + var MorphBC BoundaryCondition + type Boxes []*image.Rectangle + func (b *Boxes) Add(box *image.Rectangle) error + func (b *Boxes) Get(i int) (*image.Rectangle, error) + func (b *Boxes) SelectBySize(width, height int, tp LocationFilter, relation SizeComparison) (result *Boxes, err error) + type ClassedPoints struct + func NewClassedPoints(points *Points, classes basic.IntSlice) (*ClassedPoints, error) + func (c *ClassedPoints) GetIntXByClass(i int) (int, error) + func (c *ClassedPoints) GetIntYByClass(i int) (int, error) + func (c *ClassedPoints) GroupByY() ([]*ClassedPoints, error) + func (c *ClassedPoints) Len() int + func (c *ClassedPoints) Less(i, j int) bool + func (c *ClassedPoints) SortByX() + func (c *ClassedPoints) SortByY() + func (c *ClassedPoints) Swap(i, j int) + func (c *ClassedPoints) XAtIndex(i int) float32 + func (c *ClassedPoints) YAtIndex(i int) float32 + type Color int + const Chocolate + const Vanilla + type CombinationOperator int + const CmbOpAnd + const CmbOpNot + const CmbOpOr + const CmbOpReplace + const CmbOpXNor + const CmbOpXor + func (c CombinationOperator) String() string + type Component int + const ComponentCharacters + const ComponentConn + const ComponentWords + type Getter interface + GetBitmap func() *Bitmap + type LocationFilter int + const LocSelectHeight + const LocSelectIfBoth + const LocSelectIfEither + const LocSelectWidth + const LocSelectXVal + const LocSelectYVal + type MorphOperation int + const MopAddBorder + const MopClosing + const MopDilation + const MopErosion + const MopOpening + const MopRankBinaryReduction + const MopReplicativeBinaryExpansion + type MorphProcess struct + Arguments []int + Operation MorphOperation + type Point struct + X float32 + Y float32 + func Centroid(bm *Bitmap, centTab, sumTab []int) (Point, error) + type Points []Point + func Centroids(bms []*Bitmap) (*Points, error) + func (p *Points) Add(pt *Points) error + func (p *Points) AddPoint(x, y float32) + func (p Points) Get(i int) (Point, error) + func (p Points) GetGeometry(i int) (x, y float32, err error) + func (p Points) GetIntX(i int) (int, error) + func (p Points) GetIntY(i int) (int, error) + func (p Points) Size() int + func (p Points) XSorter() func(i, j int) bool + func (p Points) YSorter() func(i, j int) bool + type RasterOperator int + const PixClr + const PixDst + const PixMask + const PixNotDst + const PixNotPixSrcAndDst + const PixNotPixSrcOrDst + const PixNotPixSrcXorDst + const PixNotSrc + const PixNotSrcAndDst + const PixNotSrcOrDst + const PixPaint + const PixSet + const PixSrc + const PixSrcAndDst + const PixSrcAndNotDst + const PixSrcOrDst + const PixSrcOrNotDst + const PixSrcXorDst + const PixSubtract + type Selection struct + Cx int + Cy int + Data [][]SelectionValue + Height int + Name string + Width int + func SelCreateBrick(h, w int, cy, cx int, tp SelectionValue) *Selection + type SelectionValue int + const SelDontCare + const SelHit + const SelMiss + type SizeComparison int + const SizeSelectIfEQ + const SizeSelectIfGT + const SizeSelectIfGTE + const SizeSelectIfLT + const SizeSelectIfLTE + type SizeSelection int + const SizeSelectByArea + const SizeSelectByHeight + const SizeSelectByMaxDimension + const SizeSelectByPerimeter + const SizeSelectByWidth