Morphological filters

This online calculator can process the loaded image using one of the several morphological operators

This page exists due to the efforts of the following people:

Timur

Timur

Created: 2021-06-13 13:14:02, Last updated: 2021-06-13 13:19:20

This calculator allows you to apply one of four morphological filters, that is, to perform erosion, dilation, closing, or opening of the loaded image. You can also specify the kernel size: 3x3 or 5x5, and the number of repetitions of the morphological operator. The principles of the operators are described below, under the calculator.

PLANETCALC, Morphological filters

Morphological filters

Source image
  • Drag files here
Source image
 
Result
 

Morphological operators

They called morphological because the process objects in the input image based on characteristics of their shape. Basic morphological operators are:

Erosion (erode)

For each processed pixel of the image

  • calculate the value of the luminosity for all neighboring pixels (8 in the case of a 3x3 grid)
  • assign the value of the brightest pixel to the processed pixel

Thus, after applying this filter, the light parts of the image "expand". You can read about calculating the luminosity of a pixel, for example, here.

Dilation (dilate)

For each processed pixel of the image

  • calculate the value of the luminosity for all neighboring pixels (8 in the case of a 3x3 grid)
  • assign the value of the darkest pixel to the processed pixel

Thus, after applying this filter, the dark parts of the image "expand".

Closing

The closing is the sequential application of dilation and erosion

Opening

The opening is the sequential application of erosion and dilation

URL copied to clipboard
PLANETCALC, Morphological filters

Comments