imgUtils

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinaryProportion

func BinaryProportion(theSlices [][][]uint8) int

func BinaryReverse

func BinaryReverse(theSlices [][][]uint8) [][][]uint8

func BinaryThreshold

func BinaryThreshold(image *image.NRGBA) uint8

func Binaryzation

func Binaryzation(src [][][]uint8, threshold int) [][][]uint8

binaryzation process of image matrix , threshold can use 127 to test

func ConvertToNRGBA

func ConvertToNRGBA(src image.Image) *image.NRGBA

func Copy

func Copy(src [][][]uint8, dst [][][]uint8, sx, sy, dx, dy, sw, sh int)

func D8

func D8(imgMatrix [][][]uint8, x, y int) int

func DeNoise

func DeNoise(imgMatrix [][][]uint8) [][][]uint8

func GetHistGram

func GetHistGram(src [][][]uint8) []int

func GetIntermodesThreshold

func GetIntermodesThreshold(HistGram []int) int

GetIntermodesThreshold 灰度图像的直方图 基于双峰平均值的阈值 此方法实用于具有明显双峰直方图的图像,其寻找双峰的谷底作为阈值

func GetKittlerMinError

func GetKittlerMinError(HistGram []int) int

func GetMinimumThreshold

func GetMinimumThreshold(HistGram []int) int

GetMinimumThreshold 基于谷底最小值的阈值 HistGram: 灰度图像的直方图 此方法实用于具有明显双峰直方图的图像,其寻找双峰的谷底作为阈值 灰度图像的直方图

func GetYenThreshold

func GetYenThreshold(HistGram []int) int

M. Emre Celebi 06.15.2007 Ported to ImageJ plugin by G.Landini from E Celebi's fourier_0.8 routines

func GrayingImage

func GrayingImage(m *image.NRGBA) *image.NRGBA

func ImageSave

func ImageSave(fileName string, rgba *image.NRGBA) error

func IsDimodal

func IsDimodal(HistGram []float64) bool

func LoadImage

func LoadImage(filePath string) (img image.Image, err error)

func MatrixToNRGB

func MatrixToNRGB(imgMatrix [][][]uint8) (*image.NRGBA, error)

func NRGBAToMatrix

func NRGBAToMatrix(src *image.NRGBA) [][][]uint8

func New2DSlice

func New2DSlice(x int, y int) (theSlice [][]uint8)

func New3DSlice

func New3DSlice(x int, y int, z int) (theSlice [][][]uint8)

func RGB2Gray

func RGB2Gray(fileName string)

func Resize

func Resize(matrix [][][]uint8, dWidth, dHeight int) [][][]uint8

func RotateImage

func RotateImage(image [][][]uint8, theta float64, backgroundRgb uint8) [][][]uint8

*

  • 创建任意角度的旋转图像
  • @param image
  • @param theta
  • @param backgroundColor
  • @return

func SplitHorizontal

func SplitHorizontal(theSlices [][][]uint8, threshold uint8) [][][]uint8

func Text2Image

func Text2Image(ttfName string, text string, width, height int) ([][][]uint8, int)

Types

type Rect

type Rect struct {
	X      int
	Y      int
	Width  int
	Height int
}

func GetRect

func GetRect(theSlices [][][]uint8, i int, j, threshold int) Rect

func SubImageSearch

func SubImageSearch(theSlices [][][]uint8, threshold int) []Rect

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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