Grayscale area openings and closings, their efficient implementation and applications

The filter that removes from a binary image its connected components with area smaller than a parameter is called area opening. From a morphological perspective, this filter is an algebraic opening, and it can be extended to grayscale images. The properties of area openings and their dual area closings are recalled. In particular, it was proved in [13] that the area opening of parameter of an image is the supremum of the grayscale images that are smaller than and whose regional maxima are of area greater than or equal to . This theorem is at the basis of an efficient algorithm for computing grayscale area openings and closings. Its implementation involves scanning pixels in an order that depends both on their location and value. For this purpose, the use of pixel heaps is proposed. This data structure is shown to be both efficient and low in memory requirements. In addition, it can be used in the computation of various other complex morphological transforms. The use of these area openings and closings is illustrated on image filtering and segmentation tasks