Is it possible to trace MorphologicalTransform?

Is there a way to see the arguments supplied to a function specified as second argument of MorphologicalTransform?

An approach with Echo (or Print) prints something strange and at the first evaluation only:

i = Image[{{0, 0, 0}, {0, 1, 0}, {0, 0, 0}}];

MorphologicalTransform[Binarize@i, Echo[#][[2, 2]] &]

10pDv Is it possible to trace MorphologicalTransform?

Obviously there must be only 3×3 = 9 arguments supplied in this case. Why we get so many prints which apparently do not reflect the actual contents of the image? And the main question: how to obtain all the arguments supplied to the transformation function?

Let’s block ads! (Why?)

Recent Questions – Mathematica Stack Exchange