Documentation ¶
Index ¶
Constants ¶
View Source
const ParallelAuto = -1
Variables ¶
This section is empty.
Functions ¶
func PixHasDataBlackBG ¶
PixHasDataBlackBG is a simple function that returns true if pix has greater RGB values than threshold.
Types ¶
type Config ¶
type Config struct { // When a pixel is considered as the edge of the image (has meaningful data). Threshold color.RGBA64 // Check if pixel surpasses the Threshold. If nil it will use a basic pix > threshold function (gray-like comparison). PixHasData func(pix color.RGBA64, threshold color.RGBA64) bool // Region to check, if empty, image bounds are used instead. Bounds image.Rectangle // Number of gorutines used if n > 1. Use ParallelAuto (-1) for using NumCPU Parallel int }
Config contains the parameters used.
func NewConfig ¶
NewConfig returns a default config using the supplied threshold color. The PixHasData function is nil and use a basic pix > threshold function (gray-like comparison).
func NewConfigInverse ¶
NewConfigInverse returns a default config using the supplied threshold color. The PixHasData function use a basic pix < threshold function. Useful when background color is white.
func (*Config) WithBounds ¶
WithBounds sets the bounds region.
func (*Config) WithParallel ¶
WithParallel sets the parallel number of goroutines.
Click to show internal directories.
Click to hide internal directories.