FFilter Control Reference 14.1
Enumerations

Enumerations

enum  TCannyEdgeFilter { CE_SCHARR = 0 , CE_SOBEL = 1 , CE_SOBEL_2ND = 2 }
 Edge filtering method that is internally used for the canny filter operation. More...
 
enum  TFilterType {
  FT_ERODE = 0 , FT_DILATE = 1 , FT_OPENING = 2 , FT_CLOSING = 3 ,
  FT_MEAN = 4 , FT_MIN = 5 , FT_MAX = 6 , FT_MEDIAN = 7 ,
  FT_MEDIAN_COLOR = 8 , FT_CUSTOM = 9 , FT_WIENER = 10 , FT_PREWITT_HORIZONTAL = 11 ,
  FT_PREWITT_VERTICAL = 12 , FT_SCHARR_HORIZONTAL = 13 , FT_SCHARR_VERTICAL = 14 , FT_SOBEL_HORIZONTAL = 15 ,
  FT_SOBEL_VERTICAL = 16 , FT_SOBEL_2ND_HORIZONTAL = 17 , FT_SOBEL_2ND_VERTICAL = 18 , FT_SOBEL_CROSS = 19 ,
  FT_ROBERTS_DOWN = 20 , FT_ROBERTS_UP = 21 , FT_LAPLACE = 22 , FT_GAUSS = 23 ,
  FT_HIPASS = 24 , FT_LOPASS = 25 , FT_SHARPEN = 26 , FT_CANNY = 27 ,
  FT_NORMALIZEMEANVARIANCE = 28 , FT_NORMALIZEMINMAX = 29
}
 Determines which operation is applied to the input image when the Execute method is called. More...
 
enum  TMorphologyMask {
  MM_CUSTOM = 0 , MM_SQUARE = 1 , MM_RECT = 2 , MM_CROSS = 3 ,
  MM_CIRCLE = 4 , MM_ELLIPSE = 5
}
 Determines the mask type to be used with the morphological FilterTypes (FT_OPENING, FT_CLOSING, FT_DILATE, FT_ERODE). More...
 
enum  TSquareMaskType { SM_3X3 = 0 , SM_5X5 = 1 , SM_7X7 = 2 }
 Determines the size of the square mask used with some filter operations. More...
 

Detailed Description

Enumeration Type Documentation

◆ TCannyEdgeFilter

Edge filtering method that is internally used for the canny filter operation.

Returns
Size of the square mask.
Supported platforms:
Win32
Win64
Related Topics:
FilterType property, CannyEdgeFilterMethod, FT_CANNY
Enumerator
CE_SCHARR 

Simple Scharr operator.

CE_SOBEL 

Sobel operator.

CE_SOBEL_2ND 

2nd order Sobel operator.

◆ TFilterType

Determines which operation is applied to the input image when the Execute method is called.

Supported platforms:
Win32
Win64
Related Topics:
FilterType
Enumerator
FT_ERODE 

The morphological technique of erosion is also known as "grow", "bolden", and "expand". It applies a structuring element (defined by some or all of the parameters MorphologyMask , MaskWidth, MaskHeight, MaskOffsetX and MaskOffsetY plus MM_CUSTOM) to each pixel of the image and sets the value of the corresponding output pixel to the minimum value of all the pixels that are part of the structure element. Any non-black pixel in that mask image represents a pixel belonging to the structure element.

FT_DILATE 

This morphological technique is the opposite operation of the erosion (see FT_ERODE for more information). It applies a structuring element (defined by some or all of the parameters MorphologyMask , MaskWidth, MaskHeight, MaskOffsetX and MaskOffsetY plus MM_CUSTOM) to each pixel of the image and sets the value of the corresponding output pixel to the maximum value of all the pixels that are part of the structure element. Any non-black pixel in that mask image represents a pixel belonging to the structure element.

FT_OPENING 

This method first erodes the input image ImageIn and then dilates it. The Opening operator is used for deleting small regions lying outside of the object. Whereas outer edges are smoothed and thin bridges are broken. The size of morphological mask is defined by the parameters MaskHeight and MaskWidth. The mask has a model point, that is defined by the parameters MaskOffsetX and MaskOffsetY. The mask is set directly on every pixel and its new intensity is calculated in respect to the neighboring pixels covered by the mask.

Related Topics:
FT_ERODE, FT_DILATE
FT_CLOSING 

This method first dilates the input image ImageIn and then erodes it. The Closing operation is usually used for deleting small holes lying inside an object. Inner edges get smoothed out and distances smaller than the filter mask are bypassed. Any non-black pixel in that mask image represents a pixel belonging to the structure element.

Related Topics:
FT_ERODE, FT_DILATE
FT_MEAN 

Sets each pixel in the output image to the average of all the input image pixels in the rectangular neighborhood. The size of the neighborhood is specified by MaskHeight and MaskWidth with the anchor cell at that pixel. This has the effect of smoothing or blurring the input image.

FT_MIN 

Sets each pixel in the output image to the minimum value of all the input image pixel values in the neighborhood. The size of the neighborhood is specified by MaskHeight and MaskWidth with the anchor cell at that pixel.

FT_MAX 

Sets each pixel in the output image to the maximum value of all the input image pixel values in the neighborhood. The size of the neighborhood is specified by MaskHeight and MaskWidth with the anchor cell at that pixel.

FT_MEDIAN 

Sets each pixel in the output image to the median value of all the input pixel values taken in the neighborhood of the processed pixel.
The neighborhood is given by the parameters MaskWidth and MaskHeight, centered around MaskOffsetX and MaskOffsetY.

The median is a statistical value that is determined as follows:
Consider a neighbourhood of size n = w * h around the pixel being processed.
If you write the values of all the n pixels in that neighbourhood into an array in increasing pixel intensity, then the median of that intensity distribution is the (n/2)th value (the "middle one") if n is odd, or the average of the (n/2-1)th and the (n/2)th value if n is even.

FT_MEDIAN_COLOR 

For each pixel, it computes differences between red (R), green (G), and blue (B) color components of pixels in the mask neighborhood and the input pixel. This function processes the individual color planes separately, and therefore the correlation between the color planes is lost, which results in a change of the colors, which is often not desirable when working with color images.

The distance between the input pixel i and the neighborhood pixel j is formed as the sum of absolute values:

abs ( R ( i ) - R ( j )) + abs ( G( i ) - G ( j )) + abs ( B( i ) - B ( j ))

After scanning the entire neighborhood, the function sets the output value for pixel i as the value of the neighborhood pixel with the smallest distance to i. It supports square masks of size either 3x3 (see SM_3X3) or 5x5 (see SM_5X5) and processes color images only.

FT_CUSTOM 

Uses a rectangular kernel of floating-point values to filter an image that consists of integer or floating point data. Sums the products between the kernel coefficients KernelValue and pixel values taken over the source pixel neighborhood defined by KernelColumn and KernelRow and an anchor cell. The anchor cell is specified by its coordinates MaskOffsetX and MaskOffsetY in the coordinate system associated with the bottom right corner of the kernel. The sum is written to the destination pixel.

With this function, lots of filters may be reproduced that are dealt with in specialized functions.

FT_WIENER 

Performs adaptive filtering of an image degraded by constant power additive noise. For each pixel of the input image ImageIn, the function determines the local image mean and variance in the rectangular neighborhood (mask) of size MaskWidth and MaskHeight with the anchor cell centered on the pixel. The deviation from the local average is then diminished according to the local variance and the noise threshold parameters. The noise threshold parameter may be zero, in which case the function tries to determine itself what local noise threshold to apply.

Related Topics:
ThresholdWiener
FT_PREWITT_HORIZONTAL 

Applies a horizontal Prewitt operator to an area of interest of the image. The corresponding kernel is a matrix of 3x3 elements with the following values:

111
000
-1-1-1

This filter has the effect of leaving only positive horizontal edges in the image (negative results of the filtering process are zeroed out).

Related Topics:
For a filter that preserves the negative and positive values, use FT_SOBEL_HORIZONTAL and FT_SCHARR_HORIZONTAL.
FT_PREWITT_VERTICAL 

Applies a vertical Prewitt operator to an area of interest of the image. The corresponding kernel is a matrix of 3x3 elements with the following values:

-101
-101
-101

This filter has the effect of leaving only positive vertical edges in the image (negative results of the filtering process are zeroed out).

Related Topics:
For a filter that preserves the negative and positive values, use FT_SOBEL_VERTICAL and FT_SCHARR_VERTICAL.
FT_SCHARR_HORIZONTAL 

Applies a horizontal Scharr operator to an image. The corresponding kernel is a matrix of 3x3 elements with the following values:

3103
000
-3-10-3

This filter has the effect of simultaneously enhancing and smoothing horizontal edges of an image. The dynamic range of the output image is adjusted to be 0...255 (with a gray value of 128 representing zero, values below 128 representing negative filter output and values above 128 representing positive filter output).

Related Topics:
FT_SOBEL_HORIZONTAL, FT_PREWITT_HORIZONTAL
FT_SCHARR_VERTICAL 

Applies a vertical Scharr operator to an image. The corresponding kernel is a matrix of 3x3 elements with the following values:

30-3
100-10
30-3

This filter has the effect of simultaneously enhancing and smoothing vertical edges of an image. The dynamic range of the output image is adjusted to be 0...255 (with a gray value of 128 representing zero, values below 128 representing negative filter output and values above 128 representing positive filter output).

Related Topics:
FT_SOBEL_VERTICAL, FT_PREWITT_VERTICAL
FT_SOBEL_HORIZONTAL 

Applies a horizontal Sobel operator to an image. The corresponding filter kernel is a matrix of either 3x3 or 5x5 elements with the following values:

121
000
-1-2-1


14641
281282
00000
-2-8-12-8-2
-1-4-6-4-1

This filter has the effect of both enhancing and smoothing horizontal edges of an image. The dynamic range of the output image is adjusted to be 0...255 (with a gray value of 128 representing zero, values below 128 representing negative filter output and values above 128 representing positive filter output).

Related Topics:
SM_3X3, SM_5X5, TSquareMaskType, FT_SCHARR_HORIZONTAL, FT_PREWITT_HORIZONTAL
FT_SOBEL_VERTICAL 

Applies a vertical Sobel operator to an image. The corresponding filter kernel is a matrix of either 3x3 or 5x5 elements with the following values:

-101
-202
-101


-1-2021
-4-8084
-6-120126
-4-8084
-1-2021

This filter has the effect of both enhancing and smoothing vertical edges of an image. The dynamic range of the output image is adjusted to be 0...255 (with a gray value of 128 representing zero, values below 128 representing negative filter output and values above 128 representing positive filter output).

Related Topics:
SM_3X3, SM_5X5, TSquareMaskType, FT_SCHARR_VERTICAL, FT_PREWITT_VERTICAL
FT_SOBEL_2ND_HORIZONTAL 

Applies a second derivative horizontal Sobel operator to an image. The corresponding filter kernel is a matrix of either 3x3 or 5x5 elements with the following values:

121
-2-4-2
121


14641
00000
-2-8-12-8-2
00000
14641

This filter has the effect of both enhancing and smoothing horizontal edges of an image. The dynamic range of the output image is adjusted to be 0...255 (with a gray value of 128 representing zero, values below 128 representing negative filter output and values above 128 representing positive filter output).

Related Topics:
SM_3X3, SM_5X5, TSquareMaskType, FT_SOBEL_HORIZONTAL
FT_SOBEL_2ND_VERTICAL 

Applies a second derivative vertical Sobel operator to an image. The corresponding filter kernel is a matrix of either 3x3 or 5x5 elements with the following values:

1-21
2-42
1-21


10-201
40-804
60-1206
40-804
10-201

This filter has the effect of both enhancing and smoothing vertical edges of an image. The dynamic range of the output image is adjusted to be 0...255 (with a gray value of 128 representing zero, values below 128 representing negative filter output and values above 128 representing positive filter output).

Related Topics:
SM_3X3, SM_5X5, TSquareMaskType, FT_SOBEL_VERTICAL
FT_SOBEL_CROSS 

Applies a second cross derivative Sobel operator to an image. The corresponding filter kernel is a matrix of either 3x3 or 5x5 elements with the following values:

-101
000
10-1


-1-2021
-2-4042
00000
240-4-2
120-2-1

This filter has the effect of both enhancing and smoothing diagonal edges of an image. The dynamic range of the output image is adjusted to be 0...255 (with a gray value of 128 representing zero, values below 128 representing negative filter output and values above 128 representing positive filter output).

Related Topics:
SM_3X3, SM_5X5, TSquareMaskType, FT_SOBEL_VERTICAL, FT_SOBEL_HORIZONTAL
FT_ROBERTS_DOWN 

Applies a horizontal Roberts operator to an image. The corresponding kernel is a matrix of 3x3 elements with the following values:

000
010
00-1

This filter gives the rough approximation of the pixel values gradient in the horizontal direction negative results of the filtering process are zeroed out).

Related Topics:
For a filter that preserves the negative and positive values, use the FT_SOBEL_HORIZONTAL and FT_SCHARR_HORIZONTAL functions.
FT_ROBERTS_UP 

Applies a vertical Roberts operator to an image. The corresponding kernel is a matrix of 3x3 elements with the following values:

000
010
-100

This filter gives the rough approximation of the pixel values gradient in the vertical direction negative results of the filtering process are zeroed out).

Related Topics:
For a filter that preserves the negative and positive values, use the FT_SOBEL_VERTICAL and FT_SCHARR_VERTICAL functions.
FT_LAPLACE 

Applies a highpass Laplacian filter to an area of interest of the image. The corresponding filter kernel is a matrix of either 3x3 or 5x5 elements with the following values:

-1-11
-181
-1-11


-1-3-4-3-1
-3060-3
-46206-4
-3060-3
-1-3-4-3-1

This filter helps locate zero crossings in an image. Other than the function FT_HIPASS, the Laplace also preserves the negative result values that can come out of this filter function by scaling the result values' range and adding 128 to the pixel values.

Related Topics:
SM_3X3, SM_5X5, TSquareMaskType, FT_HIPASS
FT_GAUSS 

Applies a square lowpass Gaussian filter to an area of interest of the image. The corresponding filter kernel is a matrix of either 3x3 or 5x5 elements.
The 3x3 filter uses the kernel:

1/162/161/16
2/164/162/16
1/162/161/16

These filter coefficients correspond to a 2-dimensional Gaussian distribution with a standard deviation of 0.85.

The 5x5 filter uses the kernel:

2/5717/57112/5717/5712/571
7/57131/57152/57131/5717/571
12/57152/571127/57152/57112/571
7/57131/57152/57131/5717/571
2/5717/57112/5717/5712/571

These filter coefficients correspond to a 2-dimensional Gaussian distribution with a standard deviation of 1.0.

Related Topics:
SM_3X3, SM_5X5, TSquareMaskType
FT_HIPASS 

Applies a highpass filter to an area of interest of the image. The corresponding filter kernel is a matrix of either 3x3 or 5x5 elements with the following values:

-1-1-1
-18-1
-1-1-1


-1-1-1-1-1
-1-1-1-1-1
-1-124-1-1
-1-1-1-1-1
-1-1-1-1-1

This filter attenuates low-frequency components and leaves only the high-frequency components in the image.

Related Topics:
SM_3X3, SM_5X5, TSquareMaskType, FT_LAPLACE
FT_LOPASS 

Applies a lowpass filter to an area of interest of the image. The corresponding filter kernel is a matrix of either 3x3 or 5x5 elements.
The 3x3 filter uses the kernel:

1/91/91/9
1/91/91/9
1/91/91/9


The 5x5 filter uses the kernel:

1/251/251/251/251/25
1/251/251/251/251/25
1/251/251/251/251/25
1/251/251/251/251/25
1/251/251/251/251/25

This filter blurs an image by averaging the pixel values over a neighborhood. It uses a central anchor.

Related Topics:
SM_3X3, SM_5X5, TSquareMaskType
FT_SHARPEN 

Applies a sharpening filter to an image. The corresponding kernel is a matrix of 3x3 elements with the following values:

-1/8-1/8-1/8
-1/816/8-1/8
-1/8-1/8-1/8

This filter enhances high-frequency components and thereby sharpens an image.

FT_CANNY 

Finds edges in the source image and stores them into the output image ImageOut using the Canny algorithm. The Canny algorithm is proposed by J. Canny in "A Computational Approach to Edge Detection", IEEE Trans. on Pattern Analysis and Machine Intelligence 8(6), 1986. It takes an input image and produces from it an output image, in which all pixels belonging to detected edges are set to white, the rest to black.

The calculation of the output image is a three-staged process:

  1. The input image is differentiated in x and y direction, using a user-selectable derivation operator (either Scharr, Sobel or 2nd order Sobel). From those two derivatives the direction and magnitude of edges can be computed for each pixel of the input image.
  2. The directional information is simplified by assigning the edge one of four sections in the range of to 180°. Then the local maximum along an edge contour are determined, that lie above the upper threshold specified by the user.
  3. The contours are then traced starting from those local maximum using hysteresis thresholding with the lower threshold specified by the user to counter broken edges.
Related Topics:
TCannyEdgeFilter
FT_NORMALIZEMEANVARIANCE 

Applies the mean value (target average for the gray value distribution) which is used for histogram adaption.

Related Topics:
TargetVariance, TargetMean
FT_NORMALIZEMINMAX 

Applies the minimum value (lower limit for the gray value distribution) which is used for histogram adaption. TargetMin

◆ TMorphologyMask

Determines the mask type to be used with the morphological FilterTypes (FT_OPENING, FT_CLOSING, FT_DILATE, FT_ERODE).

Supported platforms:
Win32
Win64
Related Topics:
MorphologyMask
Enumerator
MM_CUSTOM 

Custom defined mask.

Attention
The MaskWidth and MaskHeight parameter are ignored. Instead the mask width and mask height is determined from the MaskImage that must be provided (which must be no bigger than 256x256 pixels). The mask offsets are tested against this width and height.
MM_SQUARE 

Squarish mask.

Attention
The MaskHeight parameter will be ignored. Instead the MaskWidth parameter also applies to the MaskHeight. The mask offsets are both tested against the MaskWidth. The custom mask MaskImage will be ignored.
MM_RECT 

Rectangular mask.

Attention
The mask offsets are both tested against the MaskWidth and MaskHeight. The custom mask MaskImage will be ignored.
MM_CROSS 

Cross mask.

Attention
The custom mask MaskImage will be ignored.
MM_CIRCLE 

Circular mask.

Attention
The MaskHeight parameter will be ignored. Instead the MaskWidth parameter also applies to the MaskHeight. The mask offsets are both tested against MaskWidth. The custom mask MaskImage will be ignored.
MM_ELLIPSE 

Ellipse mask.

Attention
The custom mask MaskImage will be ignored.

◆ TSquareMaskType

Determines the size of the square mask used with some filter operations.

See description of the individual filter function referenced under TFilterType to find out if the SquareMaskType parameter is significant for the the filter operation you want to apply, and for permissible values of this property.

Supported platforms:
Win32
Win64
Related Topics:
FilterType property, SquareMaskType, TFilterType
Enumerator
SM_3X3 

Square 3x3-filter.

SM_5X5 

Square 5x5-filter.

SM_7X7 

Square 7x7-filter.