Average if range small Black (noise) filter Dilation filter Erosion filter Geometric filter Average if range large Middle filter Difference filter Peak filter RMS filter Standard deviation filter White (noise) filter
In the morphological filters included in DigImage, the intensity of a pixel in the resultant image is set to some nonlinear combination of itself and its surrounding pixels in the source image (cf. convolution filters which use a linear combination). For these morphological filters, the basic cell size which contributes to the final intensity is user-specifyable. The pixel intensities, Pij (i=0,m-1; j=0,n-1), are utilised in the following manner:
{ Pij If MAX(P00,P01,...) - MIN(P00,P01,...) > maxRange
Pij = {
{ (P00+P01+...)/(m*n) otherwise
This filter is designed to eliminate noise from relatively slowly varying regions of the image. If the range of intensities within the filtering cell is less than a user-specified limit, then a low pass convolution will be used. If the range exceeds the limit, convolution of successively smaller cells will be used until either the cell consists of only a single pixel or the range is satisfied.
{ Pij if MIN(P00,P01,...) > 0
Pij = {
{ 0 otherwise
The effect of this filter is to eliminate nose from a region with an intensity close to zero (black). For best results, it may be necessary to subtract a constant from the image first to ensure that the noise is close to zero.
Pij = MAX(P00,P01,...)
The effect of this filter is to eliminate 'islands' of low intensity and increase the size of 'islands' of high intensity.
Pij = MIN(P00,P01,...)
The effect of this filter is to eliminate 'islands' of high intensity and decrease the size of 'islands' of low intensity.
Pij = (P00*P01*...)**(1/(m*n))
This filter has a low-pass characteristic with an emphasis towards low intensities. Clearly if one of the intensities within a cell is zero, then the resultant intensity will also be zero, so that islands of zero intensity will tend to grow.
{ Pij If MAX(P00,P01,...) - MIN(P00,P01,...) < maxRange
Pij = {
{ (P00+P01+...)/(m*n) otherwise
This filter is designed to act as a low pass filter on regions where the intensity is varying very rapidly, yet have no effect on more subtle variations. If the range of intensities within the filtering cell is more than a user-specified limit, then a low pass convolution will be used. If the range does not exceed the limit, then no further action will be taken.
Pij = (MAX(P00,P01,...) + MIN(P00,P01,...)) / 2
This filter has a low pass character.
Pij = MAX(P00,P01,...) - MIN(P00,P01,...)
This filter has a high pass character and acts to accentuate the maximum gradients of intensity within an image.
{ P_lo if Pij < P_lo
Pij = { P_hi if Pij > P_hi
{ Pij otherwise
where
P_lo = MIN(P00,P01,...) excluding Pij
P_hi = MAX(P00,P01,...) excluding Pij
The effect of this filter is to reduce the noise component of an image by eliminating extremum pixels.
Pij = SQRT((P00*P00 + P01*P01 + ...)/(m*n))
This filter has a low pass character similar to the low pass convolution filters, but utilising a root mean square average rather than the arithmetic average.
Pij = SQRT(P2 - P1*P1)
where
P1 = (P00 + P01 + ...)/(m*n)
P2 = (P00*P00 + P01*P01 + ...)/(m*n)
This filter has a high pass character. The central pixel is replaced with the standard deviation of all the pixels falling in the cell.
{ Pij if MAX(P00,P01,...) < 255
Pij = {
{ 0 otherwise
The effect of this filter is to eliminate nose from a region with an intensity close to 255 (white). For best results, it may be necessary to add a constant from the image first to ensure that the noise is close to 255.
{If Avererage if range small filter}
{If Avererage if range large}