alosca wrote:Thanks for the info on virtual-pixel. I will experiment with it. By the way, it is not that the boundaries are not properly 4-connected but HMT was reporting these 2x2 blocks on the boundaries when in fact none where shown on the processed image.
Not their are two styles of handling multi-kernel HMT, Thining, and Thickening.
HMT will return, Any pixel that will match any of the kernels. That is you will get a 'merger' of all the kernel results.
However by default thining and thickening, will apply each of the kernels to the image in sequence. that is the next kernel will be applied to the results of the previous kernel.
The result is that multiple pixels may be added or removed by thicken, thin, where HMT only shows one set of pixels.
Typically this is faster and desirable, so that is what IM does. You can however set a morphology 'compose' method, that if set will get IM to collect all the matches first, then thicken/thin, as appropriate.
I am not certain if this is
-define morphology:compose darken or if it is
lighten. Though I did try to describe it in...
Thinning Style - Sequential or Simultaneous
http://www.imagemagick.org/Usage/morpho ... ning_style
I only just edited this, to try and better describe the effects, so it make take a while to appear.
Old link (before edits) is
http://www.imagemagick.org/Usage/morpho ... ing_darken
You asked me the right question: do the 2x2 blocks I have been mentioning disqualify the results as truly 4-conn lines? Maybe not! But if I could I certainly would opt to have results without these extra pixels (again, marked with a black disk above). It seems they are not necessary at all to define the line 4-connectivity.
Actually they don't. ANY solid shape is 4-connected. And a general thicken will ensure 4-connectedness.
What you want in minimal 4-connectedness.
NOTE there is situations where 2x2 blocks are sometimes desirable in a minimal 4-connected lines,
For example...
This will likely not be a problem, as the original thinning probably converted that situation to another equivalent form, of branching connections.