utils

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CvtImageTo1DArray

func CvtImageTo1DArray(src image.Image) ([]float32, error)

convert go Image to 1-dim array

func CvtImageTo1DArrayMean added in v0.3.12

func CvtImageTo1DArrayMean(src image.Image, meanm []float32) ([]float32, error)

convert go Image to 1-dim array in the meantime, subtract mean image

func CvtImageTo2DArray added in v0.3.14

func CvtImageTo2DArray(src image.Image) ([][]float32, error)

Types

type ArgSort

type ArgSort struct {
	Args []float32
	Idxs []int
}

sort ArgSort.Args in decreasing order keep Args' original position in ArgSortIdxs

func (ArgSort) Len

func (s ArgSort) Len() int

Implement sort.Interface Len

func (ArgSort) Less

func (s ArgSort) Less(i, j int) bool

Implement sort.Interface Less

func (ArgSort) Swap

func (s ArgSort) Swap(i, j int)

Implment sort.Interface Swap

Jump to

Keyboard shortcuts

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