LibCapy - imgKernel

Kernel class to perform operations on 2D images.

Macros:

Enumerations:

None.

Typedefs:

None.

Struct CapyImgKernel :

Struct CapyImgKernel's properties:

Size of the kernel

Kernel matrix (the kernel matrix is a (1+2*size)x(1+2*size) matrix). Values stored by rows.

Size of the kernel matrix

Range to loop on the kernel values

Struct CapyImgKernel's methods:

Destructor

Convolve the kernel on a given image

Input argument(s):

img: the image to which the kernel is applied

Output and side effect(s):

Return the result of the convolution as a newly allocated image

Exception(s):

May raise CapyExc_MallocFailed.

Set the kernel to the identity

Set the kernel to Gaussian blur (the kernel is normalised)

Input argument(s):

stdDev: the standard deviation (in pixels) of the blur

Exception(s):

May raise CapyExc_MallocFailed.

Set the kernel to derivative Gaussian blur along a given axis

Input argument(s):

stdDev: the standard deviation (in pixels) of the blur

axis: axis of derivation (0:x, 1:y)

Exception(s):

May raise CapyExc_MallocFailed.

Functions:

Create a CapyImgKernel

Input argument(s):

size: the size of the kernel (the kernel matrix is a (1+2*size)x(1+2*size) matrix)

Output and side effect(s):

Return a CapyImgKernel with identity matrix (in kernel sense)

Exception(s):

May raise CapyExc_MallocFailed.

Allocate memory for a new CapyImgKernel and create it

Input argument(s):

size: the size of the kernel (the kernel matrix is a (1+2*size)x(1+2*size) matrix)

Output and side effect(s):

Return a CapyImgKernel with identity matrix (in kernel sense)

Exception(s):

May raise CapyExc_MallocFailed.

Free the memory used by a CapyImgKernel* and reset '*that' to NULL

Input argument(s):

that: a pointer to the CapyImgKernel to free