imageproc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResizeBilinear = iota
	ResizeNearestNeighbor
	ResizeApproxBilinear
	ResizeCatmullrom
)

Variables

View Source
var (
	ImageNetDefaultMean  = [3]float32{0.485, 0.456, 0.406}
	ImageNetDefaultSTD   = [3]float32{0.229, 0.224, 0.225}
	ImageNetStandardMean = [3]float32{0.5, 0.5, 0.5}
	ImageNetStandardSTD  = [3]float32{0.5, 0.5, 0.5}
	ClipDefaultMean      = [3]float32{0.48145466, 0.4578275, 0.40821073}
	ClipDefaultSTD       = [3]float32{0.26862954, 0.26130258, 0.27577711}
)

Functions

func Composite

func Composite(img image.Image) image.Image

Composite returns an image with the alpha channel removed by drawing over a white background.

func Normalize

func Normalize(img image.Image, mean, std [3]float32, rescale bool, channelFirst bool) []float32

Normalize returns a slice of float32 containing each of the r, g, b values for an image normalized around a value.

func Resize

func Resize(img image.Image, newSize image.Point, method int) image.Image

Resize returns an image which has been scaled to a new size.

Types

This section is empty.

Jump to

Keyboard shortcuts

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