images

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 7 Imported by: 0

README

Image processing utilities

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GrayToBCHW

func GrayToBCHW(img *image.Gray, dst tensor.Tensor) error

GrayToBCHW convert an image to a BCHW tensor this function returns an error if:

  • dst is not a pointer
  • dst's shape is not 4
  • dst' second dimension is not 1
  • dst's third dimension != i.Bounds().Dy()
  • dst's fourth dimension != i.Bounds().Dx()
  • dst's type is not float32 or float64 (temporary)

func ImageToBCHW

func ImageToBCHW(img image.Image, dst tensor.Tensor) error

ImageToBCHW convert an image to a BCHW tensor this function returns an error if:

  • dst is not a pointer
  • dst's shape is not 4
  • dst' second dimension is not 1
  • dst's third dimension != i.Bounds().Dy()
  • dst's fourth dimension != i.Bounds().Dx()
  • dst's type is not float32 or float64 (temporary)

func TensorToImg

func TensorToImg(t tensor.Tensor) (image.Image, error)

TensorToImg turn a BCHW tensor into an image (BCHW with B=1)

Types

This section is empty.

Jump to

Keyboard shortcuts

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