OK, some thoughts about this :
- Yes, there was a bug in G’MIC 1.7.3- with the dilation/erosion algorithm for non-symmetric kernels. It has been fixed yesterday, and I’ve released a new pre-version 1.7.4-pre available from the G’MIC web page to fix this (see Release of G'MIC 1.7.4 for the current Changelog
). - I understand what you want to do now, but that seems very specific. I think we should think about a solution that allows more generic manipulation of the kernel. I propose to let the user define its own kernel, for instance as an additional layer. So he could remove any kind of columns or values he wants without multiplying the filter controls.
- Also, note that currently if you use the square, rectangle or octogonal kernel, you actually don’t just erode/dilate with a pre-defined 2d kernel, because these particular cases can be optimized. Square/rectangles kernels use a specific optimized algorithm in the library for such kernels. Octogonal kernels use an iterative approach (several fast iterations with a 3x3 kernel instead of a single slow iteration with a NxN kernel). So in these two cases your options wouldn’t be easily applicable.
I think letting the user define its own structuring element as an addition layer is even more powerful, and keep the number of controls in a reasonable amount.