Process > Filters > 2D Filters > Kernels

 

The Kernels tab allows you to use kernels that are defined in files located in the Image-Pro\Kernels\Morphological and \Kernels\Convolution folders of the Image-Pro installation directory.  This allows you to make custom filters.  The available list of file filters appears in the Kernels pull-down list box.  

A kernels file is a simple text file that has the following format:

  • Size: Indicates the size of the kernel.  In the example above, the kernel is a 7 x 7 square.  Thus, in the Data section, there are seven rows to the kernel definition, and each row has 7 coefficients.  The coefficients tell Image-Pro what value is to be multiplied with each pixel that will be taken into account by the filter kernel.  A value of zero tells Image-Pro to ignore the pixel.  
  • Offset:   The pixel whose value is being changed is usually the center-most pixel.  You may, however, designate any pixel you want.  In the example above, the pixel third in from the right and third down from the top will be changed.
  • Boost:   Enter here the constant value to be added to the result after the value of the modification has been calculated.
  • Data:  In this section you specify the coefficients to be applied to each pixel in the matrix.  

    Guidelines

    A value of 0 (zero) tells Image-Pro to ignore the pixel.  A positive value indicates a positive weighting to give the pixel in the calculations.  For example, a value of one tells Image-Pro to count that pixel’s value once in the average; a value of two tells Image-Pro to count that pixel twice in the average, and so on.  Likewise, a negative value indicates a negative weighting to give the pixel in the average.  For example, a value of –2 tells Image-Pro to discount that pixel’s value twice in the average.  For a more detailed discussion of how kernels are processed for both Convolution and Morphological filters, read About Filters.  
     

Convolution/Morphological:  Click on one of these radio buttons to populate the Kernels pull-down list box with the desired set of file filters.  If you select Convolution, the Kernels pull-down list box is populated with all the file filters located in the \Kernels\Convolution folder.  If you select Morphological, the Kernels pull-down list box is populated with all the file filters located in the \Kernels\Morphological folder.

The following kernel files are pre-installed:

  • Morphological

  • Convolution