Using simple NumPy operations for manipulating images
Generate footprints (structuring elements)
Block views on images/arrays
Decompose flat footprints (structuring elements)