image

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateContrast added in v0.3.1

func CalculateContrast(img image.Image) float64

CalculateContrast 计算图片对比度

func CalculateOverlap added in v0.1.13

func CalculateOverlap(img1, img2 image.Image, col bool, minOverlap, maxOverlap int) int

计算两张图的重合像素,第一张的图的后半部分和第二张的前半部分

func CalculateOverlapReuseMemory added in v0.3.0

func CalculateOverlapReuseMemory(img1, img2 image.Image, col bool, minOverlap, maxOverlap int, gary1, gary2 []uint8) int

func MergeUniformBoundsImagesByOverlap added in v0.3.0

func MergeUniformBoundsImagesByOverlap(imgIdxs [][]int, getImage func(int) image.Image, imgWidth, imgHeight int,
	horizontalOverlaps, verticalOverlaps []int) image.Image

有一定重合的固定大小的图片拼图

func MergeUniformBoundsImagesByOverlapReuseMemory added in v0.3.0

func MergeUniformBoundsImagesByOverlapReuseMemory(imgIdxs [][]int, getImage func(int) image.Image, imgWidth, imgHeight int,
	horizontalOverlaps, verticalOverlaps []int, result *image.RGBA)

func RectRotateByCenter added in v0.3.0

func RectRotateByCenter(x, y, l, w int, angle float64) []image.Point

func ToGary added in v0.3.1

func ToGary(img image.Image) *image.Gray

func ToGaryReuseMemory added in v0.3.1

func ToGaryReuseMemory(img image.Image, gary *image.Gray)

func Transfer added in v0.2.0

func Transfer(src, dst string, decode Decode, encode Encode) error

func Union added in v0.1.2

func Union(rect image.Rectangle, p image.Point) image.Rectangle

Types

type AveragePoolImage added in v0.3.1

type AveragePoolImage struct {
	Rect image.Rectangle
	// contains filtered or unexported fields
}

func NewAveragePoolImage added in v0.3.1

func NewAveragePoolImage(img image.Image, reductionFactor int) *AveragePoolImage

func (*AveragePoolImage) At added in v0.3.1

func (img *AveragePoolImage) At(x, y int) color.Color

func (*AveragePoolImage) Bounds added in v0.3.1

func (img *AveragePoolImage) Bounds() image.Rectangle

func (*AveragePoolImage) ColorModel added in v0.3.1

func (img *AveragePoolImage) ColorModel() color.Model

type Decode added in v0.2.0

type Decode func(r io.Reader) (image.Image, error)

type Encode added in v0.2.0

type Encode func(io.Writer, image.Image) error

type MergeImage added in v0.3.0

type MergeImage struct {
	Pixes [][]image.Image

	Rect image.Rectangle
	// contains filtered or unexported fields
}

func NewMergeImage added in v0.3.1

func NewMergeImage(imgs [][]image.Image, width, height int, horizontalOverlaps, verticalOverlaps []int) *MergeImage

func (*MergeImage) At added in v0.3.1

func (m *MergeImage) At(x, y int) color.Color

func (*MergeImage) Bounds added in v0.3.1

func (m *MergeImage) Bounds() image.Rectangle

func (*MergeImage) ColorModel added in v0.3.1

func (m *MergeImage) ColorModel() color.Model

func (*MergeImage) ImgOffset added in v0.3.1

func (m *MergeImage) ImgOffset(x, y int) image.Image

type Point added in v0.3.2

type Point[T constraintsi.Number] struct {
	X, Y T
}

type Rectangle added in v0.3.2

type Rectangle[T constraintsi.Number] struct {
	Min, Max Point[T]
}

func Rect added in v0.3.2

func Rect[T constraintsi.Number](x0, y0, x1, y1 T) Rectangle[T]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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