Increasing the size of labels by a defined factor?

Hello everyone,

I'm currently working on an image processing pipeline. For this project I'm segmenting images and creating labels that are sort of oval. I was wondering if it is possible to increase the size of these labels by a defined factor, e.g. 20 px into each direction, to analyze the surrounding of the objects.

I'm new to this kind of analysis and any suggestions for a solution are highly appreciated. If necessary I can also provide an example picture.

Thank you!


Hi Daniel,

that's definitely possible.

If you already have your labeling, you can use the node "Morphological Labeling Operations" to dilate your labels. You can either do this by setting the operation to dilate and iterate 20 times, or by using the "Structuring Element Creator" node and pass the created structuring element (in this case a sphere) to the  "Morphological Labeling Operations" node, then iterate once.

I attached a workflow that shows the second option.



Hello Jonas,

it works perfectly. Thank you so much for your help!!



Hello Jonas and KNIME colleagues,
I would be very interested in a modification of the suggested workflow example. I have a very similar problem, but I would like to set the size of the structuring element by a variable. Specifically, I have created a dot label and this label should be extended to a sphere of a defined size. But this size is different for each image of the workflow. Ideally the size of the sphere could be controlled by a variable, but I could not find any options in the “Structuring element” node to controle the sphere size by a variable.
Thanks for your help in advance.
Kind regards