Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsumeIterator ¶
func ConsumeIterator(it ImageIterator) []image.Image
ConsumeIterator drains the iterator of images and returns them in a slice Note that consuming an entire iterator may cause heavy memory usage and usually is a bad idea
Types ¶
type Config ¶
type Config struct {
// X and Y count how many images the parent image will be split to
X, Y int
}
Config defines how to split a image
type ImageIterator ¶
ImageIterator is an iterators on a set of images
func QuadTreeIterator ¶
QuadTreeIterator iterates over an image using a quadtree mesh m -> image to iterate over maxDepth -> max depth of quadtree maxDissimilarity -> max amount of dissimilarity allowed, anything above will trigger another tree level
func SplitImageWithIterator ¶
func SplitImageWithIterator(img image.Image, cfg Config) (ImageIterator, error)
SplitImageWithIterator will split a given Image based on the given Config and return an iterator of the sub images This is more memory efficient then returning all images at once