Documentation ¶
Index ¶
- func BoundsForThreshold(img *image.NRGBA, energyThreshold float32) image.Rectangle
- func BoundsForThresholdWithMargin(img *image.NRGBA, energyThreshold float32, extend bool, margins ...int) (image.Rectangle, srgb.Color)
- func Energies(img *image.NRGBA, r image.Rectangle) (cols, rows []float32, color2 srgb.Color)
- func ToThreshold(img *image.NRGBA, energyThreshold float32) *image.NRGBA
- func ToThresholdWithMargin(img *image.NRGBA, energyThreshold float32, extend bool, margins ...int) *image.NRGBA
- type Margin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoundsForThreshold ¶
BoundsForThreshold returns the bounds for a crop of the specified image up to the given energy threshold.
energyThreshold is a value between 0.0 and 1.0 representing the maximum energy to allow to be cropped away before stopping, relative to the maximum energy of the image.
func Energies ¶
Energies returns the total row and column energies for the specified region of an image.
func ToThreshold ¶
ToThreshold returns an image cropped using the bounds provided by BoundsForThreshold.
energyThreshold is a value between 0.0 and 1.0 representing the maximum energy to allow to be cropped away before stopping, relative to the maximum energy of the image.
Types ¶
Click to show internal directories.
Click to hide internal directories.