Documentation ¶
Overview ¶
integralimg is a package for processing integral images, aka summed area tables. These are structures which precompute the sum of pixels to the left and above each pixel, which can make several common image processing operations much faster.
integralimg.Image and integralimg.SqImage fully implement the image.Image and image/draw.Draw interfaces, and hence can be used like so:
img, _, err := image.Decode(f) integral := integralimg.NewImage(b) draw.Draw(integral, b, img, b.Min, draw.Src)
The Sum(), Mean() and MeanStdDev() functions provided for the integral versions of Images significantly speed up many common image processing operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Image ¶ added in v0.2.0
type Image [][]uint64
Image is an integral Image
func NewImage ¶ added in v0.2.0
NewImage returns a new integral Image with the given bounds.
func (Image) Mean ¶ added in v0.3.0
Mean returns the average value of pixels in a rectangle
type SqImage ¶ added in v0.2.0
type SqImage [][]uint64
SqImage is a Square integral Image. A squared integral image is an integral image for which the square of each pixel is saved; this is useful for efficiently calculating Standard Deviation.
func NewSqImage ¶ added in v0.2.0
NewSqImage returns a new squared integral Image with the given bounds.
func (SqImage) Mean ¶ added in v0.3.0
Mean returns the average value of pixels in a rectangle