Documentation
¶
Index ¶
- Constants
- Variables
- func Composite(img image.Image) image.Image
- func CompositeColor(img image.Image, color color.Color) image.Image
- func Normalize(img image.Image, mean, std [3]float32, rescale bool, channelFirst bool) []float32
- func Pad(img image.Image, newSize image.Point, color color.Color, ...) image.Image
- func Resize(img image.Image, newSize image.Point, method int) image.Image
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 ¶
Composite returns an image with the alpha channel removed by drawing over a white background.
func CompositeColor ¶ added in v0.13.0
CompositeColor returns an image with the alpha channel removed by drawing over a white background.
func Normalize ¶
Normalize returns a slice of float32 containing each of the r, g, b values for an image normalized around a value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.