Versions in this module Expand all Collapse all v1 v1.2.2 Mar 3, 2022 v1.2.0 Mar 3, 2022 Changes in this version type ChannelImage + func (c ChannelImage) ImagePaletted(p color.Palette) *image.Paletted type Waifu2x + func (w Waifu2x) ScaleUpGIF(ctx context.Context, img *gif.GIF, scale float64) (*gif.GIF, error) v1.1.0 Feb 26, 2022 Changes in this version type Option + func LogOutput(w io.Writer) Option type Param + WeightVec []float64 v1.0.1 Feb 18, 2022 v0 v0.1.0 Feb 18, 2022 Changes in this version + const BlockSize + const Overlap + func Blocking(initialPlanes [3]ImagePlane) ([][]ImagePlane, int, int) + type ChannelImage struct + Buffer []uint8 + Height int + Width int + func ChannelCompose(r, g, b, a ChannelImage) ChannelImage + func ChannelDecompose(img ChannelImage) (r, g, b, a ChannelImage) + func NewChannelImage(img image.Image) (ChannelImage, bool, error) + func NewChannelImageWidthHeight(width, height int) ChannelImage + func NewDenormalizedChannelImage(p ImagePlane) ChannelImage + func (c ChannelImage) Extrapolation(px int) ChannelImage + func (c ChannelImage) ImageRGBA() image.RGBA + func (c ChannelImage) Resize(scale float64) ChannelImage + type ImagePlane struct + Buffer []float64 + Height int + Width int + func Deblocking(outputBlocks [][]ImagePlane, blocksW, blocksH int) [3]ImagePlane + func NewImagePlaneWidthHeight(width, height int) ImagePlane + func NewNormalizedImagePlane(img ChannelImage) (ImagePlane, error) + func (p *ImagePlane) SetAt(width, height int, v float64) + func (p ImagePlane) Index(width, height int) int + func (p ImagePlane) SegmentAt(x, y int) (a0, a1, a2, b0, b1, b2, c0, c1, c2 float64) + func (p ImagePlane) Value(width, height int) float64 + type Mode int + const Anime + const Photo + func (t Mode) String() string + type Model []Param + func LoadModel(r io.Reader) (Model, error) + func LoadModelAssets(path string) (Model, error) + func LoadModelFile(path string) (Model, error) + type ModelSet struct + NoiseModel Model + Scale2xModel Model + func NewAssetModelSet(t Mode, noiseLevel int) (*ModelSet, error) + type Option func(w *Waifu2x) error + func Output(w io.Writer) Option + func Parallel(p int) Option + func Verbose() Option + type Param struct + Bias []float64 + KH int + KW int + NInputPlane int + NOutputPlane int + Weight [][][][]float64 + type Waifu2x struct + func NewWaifu2x(mode Mode, noise int, opts ...Option) (*Waifu2x, error) + func (w Waifu2x) ScaleUp(ctx context.Context, img image.Image, scale float64) (image.RGBA, error)