image = | checkMultiphasedNeighourhood2dImg (inLabelImg,nbLabels,bIgnoreForeground) |
Set the intensity to 1 if the number of neighbours with higher values are greater than the specified input value.
Given an input label image, the algorithm computes a binary image in which pixels are set to 1 if the label image counts at least InNbLabels different labels in its 3x3 neighbourhood.
It is possible to process only background pixels by setting the InIgnoreForeground flag to true.
Here is an example of an result for InNbLabels = 3 (the selected pixels are displayed in green):