Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGray ¶
AddGray accepts two grayscale images and adds their pixel values. If the result for a given position overflows uint8, the result will be clamped to max uint8 (255). Example of usage:
res, err := blend.AddGray(gray1, gray2)
func AddGrayWeighted ¶
func AddGrayWeighted(img1 *image.Gray, w1 float64, img2 *image.Gray, w2 float64) (*image.Gray, error)
AddGrayWeighted accepts two grayscale images and adds their pixel values using the following equation: res(x, y) = img1(x, y) * w1 + img2(x, y) * w2 If the result for a given position overflows uint8, the result will be clamped to max uint8 (255). If the result for a given position is negative, then it will be clamped to 0. Example of usage:
res, err := blend.AddGrayWeighted(gray1, 0.25, gray2, 0.75)
func AddScalarToGray ¶
AddScalarToGray takes a grayscale image and and adds an integer value to all pixels of the image. If the result overflows uint8, the result will be clamped to max uint8 (255). Example of usage:
res := blend.AddScalarToGray(img, 56)
Types ¶
This section is empty.