VuoImageBlur implementation.
Definition in file VuoImageBlur.c.
Go to the source code of this file.
Classes | |
struct | VuoImageBlur_internal |
State data for the image blurrer. More... | |
Functions | |
void | VuoImageBlur_free (void *blur) |
Frees image blender state data. More... | |
static double | VuoImageBlur_gauss (double x, double width) |
Returns the value of the discretized, normalized gaussian function of width at x . More... | |
static VuoImage | VuoImageBlur_calculateWeights (VuoBlurShape shape, double radius) |
Returns an image containing a set of (unnormalized) weights for the specified radius , depending on shape : More... | |
VuoImageBlur | VuoImageBlur_make (void) |
Creates state data for the image blurrer. More... | |
VuoImage | VuoImageBlur_blur (VuoImageBlur blur, VuoImage image, VuoImage mask, VuoBlurShape shape, VuoReal radius, VuoReal quality, VuoBoolean expandBounds) |
Returns a blurred copy of image. More... | |
VuoImage | VuoImageBlur_blurDirectionally (VuoImageBlur blur, VuoImage image, VuoImage mask, VuoBlurShape shape, VuoReal radius, VuoReal quality, VuoReal angle, VuoBoolean symmetric, VuoBoolean expandBounds) |
Returns a linearly-blurred copy of image. More... | |
VuoImage | VuoImageBlur_blurRadially (VuoImageBlur blur, VuoImage image, VuoImage mask, VuoBlurShape shape, VuoPoint2d center, VuoReal radius, VuoReal quality, VuoDispersion dispersion, VuoCurveEasing symmetry, VuoBoolean expandBounds) |
Returns a radially-blurred copy of image. More... | |
VuoImage VuoImageBlur_blur | ( | VuoImageBlur | blur, |
VuoImage | image, | ||
VuoImage | mask, | ||
VuoBlurShape | shape, | ||
VuoReal | radius, | ||
VuoReal | quality, | ||
VuoBoolean | expandBounds | ||
) |
Returns a blurred copy of image.
(Or, if radius is zero, returns image.)
radius
is in points, and respects the image's scaleFactor
(this function multiplies the two values).
If expandBounds is true, the output image will be expanded to encompass the full bleed of the blur. Otherwise, the output image will have the same dimensions as the soure image.
Definition at line 388 of file VuoImageBlur.c.
VuoImage VuoImageBlur_blurDirectionally | ( | VuoImageBlur | blur, |
VuoImage | image, | ||
VuoImage | mask, | ||
VuoBlurShape | shape, | ||
VuoReal | radius, | ||
VuoReal | quality, | ||
VuoReal | angle, | ||
VuoBoolean | symmetric, | ||
VuoBoolean | expandBounds | ||
) |
Returns a linearly-blurred copy of image.
(Or, if radius is zero, returns image.)
radius
is in points, and respects the image's scaleFactor
(this function multiplies the two values).
Definition at line 481 of file VuoImageBlur.c.
VuoImage VuoImageBlur_blurRadially | ( | VuoImageBlur | blur, |
VuoImage | image, | ||
VuoImage | mask, | ||
VuoBlurShape | shape, | ||
VuoPoint2d | center, | ||
VuoReal | radius, | ||
VuoReal | quality, | ||
VuoDispersion | dispersion, | ||
VuoCurveEasing | symmetry, | ||
VuoBoolean | expandBounds | ||
) |
Returns a radially-blurred copy of image.
(Or, if radius is zero, returns image.)
radius
is in points, and respects the image's scaleFactor
(this function multiplies the two values).
Definition at line 534 of file VuoImageBlur.c.
|
static |
Returns an image containing a set of (unnormalized) weights for the specified radius
, depending on shape
:
Since the weights are symmetric, only the right half (including zero) is provided.
Definition at line 68 of file VuoImageBlur.c.
void VuoImageBlur_free | ( | void * | blur | ) |
Frees image blender state data.
Definition at line 40 of file VuoImageBlur.c.
|
static |
Returns the value of the discretized, normalized gaussian function of width
at x
.
erf(x)
is the integral of the gaussian function from -inf to x. So, find the integral of the gaussian function from x-delta to x+delta by taking the difference between erf()
at those positions.
Definition at line 54 of file VuoImageBlur.c.
VuoImageBlur VuoImageBlur_make | ( | void | ) |
Creates state data for the image blurrer.
Definition at line 142 of file VuoImageBlur.c.