Documentation ¶
Index ¶
- func CalcAverageGrayLevel(img *image.Gray) uint8
- func CalcContrastAndBrightness(rangeBlock *image.Gray, domainBlock *image.Gray) (float64, float64)
- func CalcSquarredEuclideanDistance(rangeBlock *image.Gray, domainBlock *image.Gray) float64
- func CreateFractalFromImage(img *image.Gray, numberOfIterations int, transformations []Transformation) *image.Gray
- func Decompress(encoding [][]EncodingParams, iterations int) *image.Gray
- func DivideImage(img *image.Gray, pixelSize int) [][]*image.Gray
- func FindBestMatchingDomains(ranges [][]*image.Gray, domains [][]*image.Gray) [][]EncodingParams
- func GrayTransformImage(img *image.Gray, s float64, g float64) *image.Gray
- func ImageToBW(img *image.Image) *image.Gray
- func ImageToGray(img *image.Image) *image.Gray
- func LoadImageFromFile(filename string) *image.Image
- func SaveImageToFile(img *image.Gray, filename string)
- func ScaleImage(img *image.Gray, scalingFactor float64) *image.Gray
- func ScaleImage2(img *image.Gray, scalingFactor float64) *image.Gray
- func TransformImage(img *image.Gray, transformationType uint8) *image.Gray
- type EncodingParams
- type Transformation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcAverageGrayLevel ¶
CalcAverageGrayLevel iterates over all pixel in the image and calcuates the average gray level
func CalcContrastAndBrightness ¶
CalcContrastAndBrightness using this function: http://einstein.informatik.uni-oldenburg.de/rechnernetze/fraktal.htm
func CalcSquarredEuclideanDistance ¶
CalcSquarredEuclideanDistance calculates the euclidean distance between a range and a domain block it returns the euclidean distance, and the parameters s and g
func CreateFractalFromImage ¶
func CreateFractalFromImage(img *image.Gray, numberOfIterations int, transformations []Transformation) *image.Gray
CreateFractalFromImage is a Function to create fractal from ISF
func Decompress ¶
func Decompress(encoding [][]EncodingParams, iterations int) *image.Gray
Decompress sad
func DivideImage ¶
DivideImage slices an image into pixelSize*pixelSize smaller images and returning them in an array
func FindBestMatchingDomains ¶
func FindBestMatchingDomains(ranges [][]*image.Gray, domains [][]*image.Gray) [][]EncodingParams
FindBestMatchingDomains finds the best matching domain
func GrayTransformImage ¶
GrayTransformImage applies contrast and brightness transformation to image
func ImageToBW ¶
ImageToBW takes an image.Image pointer and return it as image.Gray where only pixelvalues of 0 and 255 are allowed (only black and white)
func ImageToGray ¶
ImageToGray takes an image.Image pointer and returns it as image.Gray
func LoadImageFromFile ¶
LoadImageFromFile returns a pointer to an image.Image by providing a filename
func SaveImageToFile ¶
SaveImageToFile saves a i*mg.Gray pointer to the specified filename with the *_edited* filepostix
func ScaleImage ¶
ScaleImage scales a given image pointer by *scalingFactor* and returns the result Use only scalingFactor <= 1 and > 0!
func ScaleImage2 ¶
ScaleImage2 scales via an ifs is ok for minimal scaling, but doesnt do well on more extreme scalings
func TransformImage ¶
TransformImage applies one of 8 transformations to the image 0 - Identity 1 - Rotation by 90° 2 - Rotation by 180° 3 - Rotation by 270° 4 - Flip at y axis 5 - Flip at x axis 6 - Mirror at y=x 7 - Mirror at y=-x
Types ¶
type EncodingParams ¶
EncodingParams saves the encoding parameters for every range which shall be recreated
type Transformation ¶
type Transformation struct {
A, B, C, D, E, F float64
}
Transformation is a struct to describe a ISF transformation