From: Vassilis on
Suppose we have a binary image A with dimensions NxM and Q pixels of value 1 where Q<N^2. Suppose again that we have a simple SE, denoted by B where B=true(1,3).

the question is:
in order to dilate, erode or apply rank order, is the B moving and "sitting" over each pixel of A?
if yes, which is the reason to put B "over" an OFF pixel of A during erosion?
or "over" an ON pixel during dilation?

If no, how are the pixels (to put B "over" them) selected?
And if there is a way to select these pixels, is this taken under consideration during rank order filter with r=1 (dilation) or r=3 (erosion)?