Documentation ¶
Index ¶
- Constants
- func Blur(imgsrc image.Image, radius float64) image.Image
- func Divid(bounds image.Rectangle, s int) []image.Rectangle
- func DrawLine(p image.Point, angle float64, length int, imgsrc image.Image, c color.Color) *image.RGBA
- func DrawSquare(img image.Image, r image.Rectangle, density int, c color.Color) image.Image
- func Ft(t float64) float64
- func Gabor(x, y int, lambda float64) []float64
- func GaborFilter(imgsrc image.Image, bounds image.Rectangle)
- func GaborFilterKernel(period, phase, angle float64, size int, imgsrc image.Image) [][]float64
- func Gaussian(x, y int, sigma float64) float64
- func GaussianBlur(imgsrc image.Image, kernel, radius int) image.Image
- func Intensity(rgb RGB) float64
- func IntensityFeatures(imgsrc image.Image) image.Image
- func Intensityrgb(rgb RGB) (uint8, uint8, uint8)
- func Magnitude(x, y float64) float64
- func Orientation()
- func OrientationXY(x, y float64) float64
- func RGBChannel(imgsrc image.Image, channel string) image.Image
- type ImageInfo
- type Img
- type LAB
- type RGB
- type RGBY
- type XYZ
Constants ¶
View Source
const ( FULLCIRCLE float64 = 360 HALFCIRCLE float64 = 180 K float64 = 8 PI float64 = math.Pi )
Constant
Variables ¶
This section is empty.
Functions ¶
func DrawLine ¶
func DrawLine(p image.Point, angle float64, length int, imgsrc image.Image, c color.Color) *image.RGBA
DrawLine draw a line in image.
func DrawSquare ¶
DrawSquare to draw squareline in a given image.
func Gabor ¶
Gabor filter.
G(θ, λ, ϕ, σ, γ, x,y) = exp(x'^2+(y^2*y'^2)/2σ^2) * exp(i(2PI*x'/ γ + ϕ)) where x' = x*cosθ + y*sinθ y' = x*sinθ + y*cosθ σ = sigma of gaussian envelope = Pi γ = gamma spatial aspect ratio = 1 ϕ = phi phase offset = 0 θ = theta angle = i*Pi/K λ = lambda > 0.2*img
func GaborFilterKernel ¶
func GaussianBlur ¶
GaussianBlur blur image with gauss formula.
func Intensityrgb ¶
Intensityrgb equation to give the intensity of a pixel (RGB)
func OrientationXY ¶
OrientationXY calculate orientation of two points
f(x, y) = atan2(x, y) * 180 / 3.14 % 360
Types ¶
type ImageInfo ¶
type ImageInfo struct { Wg sync.WaitGroup sync.RWMutex Format string Name string Bounds image.Rectangle Scalsize int Cellsize int }
ImageInfo image information.
func NewImageInfo ¶
NewImageInfo return ImageInfo struct.
type LAB ¶
type LAB struct {
L, A, B float64
}
LAB is CieLab color
func RGBAtoCieLAB ¶
RGBAtoCieLAB convert rgb to CieLAB using https://hrcak.srce.hr/file/193994 page 3/8
func XYZtoCieLAB ¶
XYZtoCieLAB convert xyz to Cie*L*a*b Reference: https://www.mathworks.com/help/images/ref/xyz2lab.html using D65:[0.9504, 1.0000, 1.0888]
Click to show internal directories.
Click to hide internal directories.