Morph module


i don’t think it is strictly a bug, but i think some of the behavior is not very intuitive.

for most operations (e.g. open, tophat, …) it would (in my view) make much more sense to enter the radius of the structural elements, rather than the rounds of repetition. in fact, i do not even really understand in which case one would, for instance, repeat the same open operation many times: either an object is smaller than the opening radius and thus will disappear or it is not; i.e. an object in the image do not get smaller by repeating the open operation, or?

this should be easy to implement, because most of the functions in in fact have a radius parameter already, e.g.
white_tophat(image, radius=None, mask=None):

my recommendation/wish:

replace ‘#repeats’ by ‘radius of structural element’.



Hi Tischi,

Re: structural element size - We definitely agree! We added a diameter setting to Morph which will be part of the next release.

Re: the repetition parameter - This setting is most helpful when using skel, shrink, thicken, and thin, with the terminal result achieved using “Repeat forever.”