CVB.Net 14.0
Filter Class Reference

Filter functions that come with the Minos library. More...

Public Types

enum  KernelSize { Kernel2x2 = 2 , Kernel3x3 = 3 , Kernel4x4 = 4 , Kernel5x5 = 5 }
 Available kernel sizes for the filter functions exported by the Minos library. Note that not all filters will work with all kernel sizes (see filter function description for a list) and some filters only work with a fixed kernel size in the Minos library. Note also that the Minos filters will only work on images with 8 bits per pixel input. More...
 
enum  FilterOrder { Order1st = 1 , Order2nd = 2 }
 Order of the ButterworthLowPass or ButterworthHighPassfilter to be applied. More...
 

Static Public Member Functions

static Image Laplace (Image image)
 Apply a 3x3 Laplace filter to the input image. An offset gray value of 128 is added to the result to reduce loss of information. Underflow and overflow gray values are truncated to 0 and 255 respectively. More...
 
static Image Sharpen (Image image)
 Apply a 3x3 sharpen filter to the input image. Underflow and overflow gray values are truncated to 0 and 255 respectively. More...
 
static Image Dilate (Image image)
 Apply a 3x3 dilation filter to the input image. More...
 
static Image Erode (Image image)
 Apply a 3x3 erode filter to the input image. More...
 
static Image ButterworthHighPass (Image image, double gain, int offset, double cutOff, FilterOrder order)
 Apply a ButterWorth high pass filter to the image . Underflow and overflow gray values are truncated to 0 and 255 respectively. More...
 
static Image ButterworthLowPass (Image image, double cutOff, FilterOrder order)
 Apply a ButterWorth low pass filter to the image . Underflow and overflow gray values are truncated to 0 and 255 respectively. More...
 
static Image LowPass (Image image, KernelSize kernelSize)
 Apply a low pass filter to the input image . Low pass filters are available with kernel sizes 2x2, 3x3 and 5x5. More...
 
static Image Edge (Image image, KernelSize kernelSize)
 Apply an Edge filter to the input image . Edge filters are available with kernel sizes 2x2 and 3x3. More...
 
static Image Pyramid (Image image, KernelSize kernelSize)
 Apply an Pyramid filter to the input image . Pyramid filters are available with kernel sizes 3x3, 4x4 and 5x5. More...
 
static Image User (Image image, KernelSize kernelSize, double[] kernel)
 Apply a user-defined filter to the input image . The convolution kernel may have the size 2x2, 3x3 or 5x5. The filter coefficients need to be specified as an array of double values passed as the kernel argument. Please note that although the kernel elements are of type double, the filter will only work on and only create output data with 8 bits per pixel. Overflow and under- flow values will be truncated to 0 and 255 respectively. More...
 
static Image User (Image image, KernelSize kernelSize, double[,] kernel)
 Apply a user-defined filter to the input image . The convolution kernel may have the size 2x2, 3x3 or 5x5. The filter coefficients need to be specified as an array of double values passed as the kernel argument. Please note that although the kernel elements are of type double, the filter will only work on and only create output data with 8 bits per pixel. Overflow and under- flow values will be truncated to 0 and 255 respectively. More...
 

Detailed Description

Filter functions that come with the Minos library.

Member Enumeration Documentation

◆ FilterOrder

Order of the ButterworthLowPass or ButterworthHighPassfilter to be applied.

Enumerator
Order1st 

1st order filter

Order2nd 

2nd order filter

◆ KernelSize

enum KernelSize

Available kernel sizes for the filter functions exported by the Minos library. Note that not all filters will work with all kernel sizes (see filter function description for a list) and some filters only work with a fixed kernel size in the Minos library. Note also that the Minos filters will only work on images with 8 bits per pixel input.

Enumerator
Kernel2x2 

kernel with 2x2 elements

Kernel3x3 

kernel with 3x3 elements

Kernel4x4 

kernel with 4x4 elements

Kernel5x5 

kernel with 5x5 elements

Member Function Documentation

◆ ButterworthHighPass()

static Image ButterworthHighPass ( Image  image,
double  gain,
int  offset,
double  cutOff,
FilterOrder  order 
)
static

Apply a ButterWorth high pass filter to the image . Underflow and overflow gray values are truncated to 0 and 255 respectively.

Parameters
imageimage to be filtered
cutOffcut off parameter of the ButterWorth algorithm
gaingain to be applied to the frequency response
offsetoffset to be applied to the frequency response
orderorder of the ButterWorth filter to be used
Returns
filtered image
Exceptions
ArgumentNullExceptionIf the image parameter is null
ObjectDisposedExceptionIf the image has already been disposed of
CvbExceptionwhen trying to call the filter function on an image with a pixel format other than 8 bits per pixel unsigned

◆ ButterworthLowPass()

static Image ButterworthLowPass ( Image  image,
double  cutOff,
FilterOrder  order 
)
static

Apply a ButterWorth low pass filter to the image . Underflow and overflow gray values are truncated to 0 and 255 respectively.

Parameters
imageimage to be filtered
cutOffcut off parameter of the ButterWorth algorithm
orderorder of the ButterWorth filter to be used
Returns
filtered image
Exceptions
ArgumentNullExceptionIf the image parameter is null
ObjectDisposedExceptionIf the image has already been disposed of
CvbExceptionwhen trying to call the filter function on an image with a pixel format other than 8 bits per pixel unsigned

◆ Dilate()

static Image Dilate ( Image  image)
static

Apply a 3x3 dilation filter to the input image.

Parameters
imageimage to be filtered
Returns
filtered image
Exceptions
ArgumentNullExceptionIf the image parameter is null
ObjectDisposedExceptionIf the image has already been disposed of
CvbExceptionwhen trying to call the filter function on an image with a pixel format other than 8 bits per pixel unsigned

◆ Edge()

static Image Edge ( Image  image,
KernelSize  kernelSize 
)
static

Apply an Edge filter to the input image . Edge filters are available with kernel sizes 2x2 and 3x3.

Parameters
imageimage to be filtered
kernelSizekernel size to be used
Returns
filtered image
Exceptions
ArgumentNullExceptionIf the image parameter is null
ObjectDisposedExceptionIf the image has already been disposed of
CvbExceptionwhen trying to call the filter function on an image with a pixel format other than 8 bits per pixel unsigned
ArgumentExceptionIf an invalid kernelSize was selected

◆ Erode()

static Image Erode ( Image  image)
static

Apply a 3x3 erode filter to the input image.

Parameters
imageimage to be filtered
Returns
filtered image
Exceptions
ArgumentNullExceptionIf the image parameter is null
ObjectDisposedExceptionIf the image has already been disposed of
CvbExceptionwhen trying to call the filter function on an image with a pixel format other than 8 bits per pixel unsigned

◆ Laplace()

static Image Laplace ( Image  image)
static

Apply a 3x3 Laplace filter to the input image. An offset gray value of 128 is added to the result to reduce loss of information. Underflow and overflow gray values are truncated to 0 and 255 respectively.

Parameters
imageimage to be filtered
Returns
filtered image
Exceptions
ArgumentNullExceptionIf the image parameter is null
ObjectDisposedExceptionIf the image has already been disposed of
CvbExceptionwhen trying to call the filter function on an image with a pixel format other than 8 bits per pixel unsigned

◆ LowPass()

static Image LowPass ( Image  image,
KernelSize  kernelSize 
)
static

Apply a low pass filter to the input image . Low pass filters are available with kernel sizes 2x2, 3x3 and 5x5.

Parameters
imageimage to be filtered
kernelSizekernel size to be used
Returns
filtered image
Exceptions
ArgumentNullExceptionIf the image parameter is null
ObjectDisposedExceptionIf the image has already been disposed of
CvbExceptionwhen trying to call the filter function on an image with a pixel format other than 8 bits per pixel unsigned
ArgumentExceptionIf an invalid kernelSize was selected

◆ Pyramid()

static Image Pyramid ( Image  image,
KernelSize  kernelSize 
)
static

Apply an Pyramid filter to the input image . Pyramid filters are available with kernel sizes 3x3, 4x4 and 5x5.

Parameters
imageimage to be filtered
kernelSizekernel size to be used
Returns
filtered image
Exceptions
ArgumentNullExceptionIf the image parameter is null
ObjectDisposedExceptionIf the image has already been disposed of
CvbExceptionwhen trying to call the filter function on an image with a pixel format other than 8 bits per pixel unsigned
ArgumentExceptionIf an invalid kernelSize was selected

◆ Sharpen()

static Image Sharpen ( Image  image)
static

Apply a 3x3 sharpen filter to the input image. Underflow and overflow gray values are truncated to 0 and 255 respectively.

Parameters
imageimage to be filtered
Returns
filtered image
Exceptions
ArgumentNullExceptionIf the image parameter is null
ObjectDisposedExceptionIf the image has already been disposed of
CvbExceptionwhen trying to call the filter function on an image with a pixel format other than 8 bits per pixel unsigned

◆ User() [1/2]

static Image User ( Image  image,
KernelSize  kernelSize,
double  kernel[,] 
)
static

Apply a user-defined filter to the input image . The convolution kernel may have the size 2x2, 3x3 or 5x5. The filter coefficients need to be specified as an array of double values passed as the kernel argument. Please note that although the kernel elements are of type double, the filter will only work on and only create output data with 8 bits per pixel. Overflow and under- flow values will be truncated to 0 and 255 respectively.

Parameters
imageimage to be filtered
kernelSizekernel size to be used
kernelkernel coefficients; the number of coefficients that are needed depends on the kernelSize . If too many coefficients are given then any surplus coefficients will be ignored. The kernel coefficients may be passed as a 1D array with width * height elements or as a 2D array with width and height elements
Returns
filtered image
Exceptions
ArgumentNullExceptionIf the image parameter or the kernel parameter is null
ObjectDisposedExceptionIf the image has already been disposed of
CvbExceptionwhen trying to call the filter function on an image with a pixel format other than 8 bits per pixel unsigned
ArgumentExceptionIf an invalid kernelSize was selected or if an insufficient number of coefficients was given

◆ User() [2/2]

static Image User ( Image  image,
KernelSize  kernelSize,
double[]  kernel 
)
static

Apply a user-defined filter to the input image . The convolution kernel may have the size 2x2, 3x3 or 5x5. The filter coefficients need to be specified as an array of double values passed as the kernel argument. Please note that although the kernel elements are of type double, the filter will only work on and only create output data with 8 bits per pixel. Overflow and under- flow values will be truncated to 0 and 255 respectively.

Parameters
imageimage to be filtered
kernelSizekernel size to be used
kernelkernel coefficients; the number of coefficients that are needed depends on the kernelSize . If too many coefficients are given then any surplus coefficients will be ignored. The kernel coefficients should be passed as a 1D array with width * height elements starting in the top left corner of the filter mask and listing the elements line by line
Returns
filtered image
Exceptions
ArgumentNullExceptionIf the image parameter or the kernel parameter is null
ObjectDisposedExceptionIf the image has already been disposed of
CvbExceptionwhen trying to call the filter function on an image with a pixel format other than 8 bits per pixel unsigned
ArgumentExceptionIf an invalid kernelSize was selected or if an insufficient number of coefficients was given