Documentation ¶
Overview ¶
Package chess implements computer vision algorithms useful in chess.
Index ¶
- Constants
- Variables
- func FindChessCornersPinkCheat(img *rimage.Image, logger golog.Logger) (image.Image, []image.Point, error)
- func FindChessCornersPinkCheatInQuadrant(img *rimage.Image, dc *gg.Context, cnts [][]image.Point, xQ, yQ int, ...) image.Point
- type Board
- func FindAndWarpBoard(col *rimage.Image, dm *rimage.DepthMap, logger golog.Logger) (*Board, error)
- func FindAndWarpBoardFromFiles(colorFN, depthFN string, aligned bool, logger golog.Logger) (*Board, error)
- func FindAndWarpBoardFromFilesRoot(root string, aligned bool, logger golog.Logger) (*Board, error)
- func (b *Board) Annotate() image.Image
- func (b *Board) IsBoardBlocked() bool
- func (b *Board) SquareCenterEdges(square string) int
- func (b *Board) SquareCenterHeight(square string, radius int) float64
- func (b *Board) SquareCenterHeight2(square string, radius int, matchColor bool) float64
- func (b *Board) WriteDebugImages(prefix string) error
- type Game
- type SquareFunc
Constants ¶
View Source
const ( SquareEmpty = 0 SquareWhite = 1 SquareBlack = 2 )
The set of square colors.
View Source
const EdgeThreshold = 100
EdgeThreshold TODO.
Variables ¶
View Source
var ( DepthCheckSizeRadius = 20 MinPieceDepth = 9.9999 )
TODO.
Functions ¶
Types ¶
type Board ¶
type Board struct {
// contains filtered or unexported fields
}
Board TODO.
func FindAndWarpBoard ¶
FindAndWarpBoard TODO.
func FindAndWarpBoardFromFiles ¶
func FindAndWarpBoardFromFiles(colorFN, depthFN string, aligned bool, logger golog.Logger) (*Board, error)
FindAndWarpBoardFromFiles TODO.
func FindAndWarpBoardFromFilesRoot ¶
FindAndWarpBoardFromFilesRoot TODO.
func (*Board) SquareCenterEdges ¶
SquareCenterEdges TODO.
func (*Board) SquareCenterHeight ¶
SquareCenterHeight TODO.
func (*Board) SquareCenterHeight2 ¶
SquareCenterHeight2 TODO return highes SquareCenterHeight2 TODOt delta, average floor height.
func (*Board) WriteDebugImages ¶
WriteDebugImages TODO.
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
Game TODO.
func (*Game) GetPieceHeight ¶
GetPieceHeight TODO.
func (*Game) GetSquaresWithPieces ¶
GetSquaresWithPieces TODO.
Click to show internal directories.
Click to hide internal directories.