VuoImageConvolve implementation.
Definition in file VuoImageConvolve.c.
Go to the source code of this file.
Classes | |
struct | VuoImageConvolve_internal |
State data for the image convolver. More... | |
Functions | |
void | VuoImageConvolve_free (void *convolve) |
Frees image blender state data. More... | |
double | VuoImageConvolve_laplacianOfGaussian (double x, double y, double radius) |
Returns the (0,0)-centered Laplacian-of-Gaussian function at the given position and sigma. More... | |
unsigned int | VuoImageConvolve_laplacianOfGaussianWidth (double radius) |
Returns a recommended matrix width for VuoImageConvolve_laplacianOfGaussian. More... | |
VuoImage | VuoImageConvolve_generateMatrix (VuoImageConvolveFunction f, unsigned int width, bool removeDCOffset, double param) |
Returns an image containing a set of (unnormalized) weights for the specified function. More... | |
VuoImageConvolve | VuoImageConvolve_make (void) |
Creates state data for the image Convolverer. More... | |
VuoImage | VuoImageConvolve_convolve (VuoImageConvolve convolve, VuoImage image, VuoImage convolutionMatrix, VuoThresholdType channels, double intensity, VuoDiode range) |
Returns a convolved copy of image. More... | |
struct VuoImageConvolve_internal |
Class Members | ||
---|---|---|
VuoShader | shader |
VuoImage VuoImageConvolve_convolve | ( | VuoImageConvolve | convolve, |
VuoImage | image, | ||
VuoImage | convolutionMatrix, | ||
VuoThresholdType | channels, | ||
double | intensity, | ||
VuoDiode | range | ||
) |
Returns a convolved copy of image.
(Or, if radius is zero, returns image.)
convolutionMatrix
must be square and have odd width/height.
Definition at line 194 of file VuoImageConvolve.c.
void VuoImageConvolve_free | ( | void * | convolve | ) |
Frees image blender state data.
Definition at line 39 of file VuoImageConvolve.c.
VuoImage VuoImageConvolve_generateMatrix | ( | VuoImageConvolveFunction | f, |
unsigned int | width, | ||
bool | removeDCOffset, | ||
double | param | ||
) |
Returns an image containing a set of (unnormalized) weights for the specified function.
Definition at line 80 of file VuoImageConvolve.c.
double VuoImageConvolve_laplacianOfGaussian | ( | double | x, |
double | y, | ||
double | radius | ||
) |
Returns the (0,0)-centered Laplacian-of-Gaussian function at the given position and sigma.
(This is the continuous version of the function, but we make up for it by normalizing and removing the DC offset in VuoImageConvolve_generateMatrix.)
Definition at line 50 of file VuoImageConvolve.c.
unsigned int VuoImageConvolve_laplacianOfGaussianWidth | ( | double | radius | ) |
Returns a recommended matrix width for VuoImageConvolve_laplacianOfGaussian.
Definition at line 63 of file VuoImageConvolve.c.
VuoImageConvolve VuoImageConvolve_make | ( | void | ) |
Creates state data for the image Convolverer.
Definition at line 125 of file VuoImageConvolve.c.