Documentation ¶
Index ¶
- Variables
- func Blur(dst draw.Image, src image.Image, opt *BlurOptions) error
- func Rotate(dst draw.Image, src image.Image, opt *RotateOptions) error
- func Scale(dst draw.Image, src image.Image) error
- func Thumbnail(dst draw.Image, src image.Image) error
- type Affine
- func (a Affine) Center(x, y float64) Affine
- func (a Affine) CenterFit(dst, src image.Rectangle) Affine
- func (a Affine) Mul(b Affine) Affine
- func (a Affine) Rotate(angle float64) Affine
- func (a Affine) Scale(x, y float64) Affine
- func (a Affine) Shear(x, y float64) Affine
- func (a Affine) Transform(dst draw.Image, src image.Image, i interp.Interp) error
- func (a Affine) TransformCenter(dst draw.Image, src image.Image, i interp.Interp) error
- func (a Affine) Translate(x, y float64) Affine
- type BlurOptions
- type RotateOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultStdDev = 0.5
DefaultStdDev is the default blurring parameter.
View Source
var I = Affine{
1, 0, 0,
0, 1, 0,
0, 0, 1,
}
I is the identity Affine transform matrix.
Functions ¶
Types ¶
type Affine ¶
type Affine [9]float64
Affine is a 3x3 2D affine transform matrix. M(i,j) is Affine[i*3+j].
func (Affine) CenterFit ¶
CenterFit produces the affine transform, centered around the rectangles. It is equivalent to
I.Translate(-<center of src>).Mul(a).Translate(<center of dst>)
func (Affine) TransformCenter ¶
TransformCenter applies the affine transform to src and produces dst. Equivalent to
a.CenterFit(dst, src).Transform(dst, src, i).
type BlurOptions ¶
BlurOptions are the blurring parameters. StdDev is the standard deviation of the normal, higher is blurrier. Size is the size of the kernel. If zero, it is set to Ceil(6 * StdDev).
type RotateOptions ¶
type RotateOptions struct {
Angle float64
}
RotateOptions are the rotation parameters. Angle is the angle, in radians, to rotate the image clockwise.
Directories ¶
Path | Synopsis |
---|---|
Package detect implements an object detector cascade.
|
Package detect implements an object detector cascade. |
Package interp implements image interpolation.
|
Package interp implements image interpolation. |
Click to show internal directories.
Click to hide internal directories.