vision

package
v0.0.0-...-9afed2f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SynthesizeImage

func SynthesizeImage(w, h int, c color.Color) image.Image

SynthesizeImage creates an image of specified size and uniform color. To generate a blue image of generate ImageNet size (469x387), we can call

blue := color.RGBA{0, 0, 255, 255}
m := SynthesizeImage(469, 387, blue)

Types

type Synthesizer

type Synthesizer struct {
	*tar.Writer
	// contains filtered or unexported fields
}

Synthesizer synthesize a tar.gz file of images.

func NewSynthesizer

func NewSynthesizer(output io.Writer) *Synthesizer

NewSynthesizer creates a synthesizer.

func (*Synthesizer) AddImage

func (s *Synthesizer) AddImage(fn string, w, h int, c color.Color) error

AddImage synthesize an image with given filename, size, and color.

func (*Synthesizer) Close

func (s *Synthesizer) Close()

Close a synthesizer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL