Visit ComfyUI Online for ready-to-use ComfyUI environment
Modify mask images by expanding or shrinking masked areas for precise boundary refinement in image processing workflows.
The DilateErodeMask
node is designed to modify mask images by either expanding (dilating) or shrinking (eroding) the masked areas. This node is particularly useful for AI artists who need to refine mask boundaries in their image processing workflows. By adjusting the radius and shape parameters, you can control the extent and form of the dilation or erosion, allowing for precise manipulation of the mask. This can be beneficial for tasks such as enhancing details, removing noise, or preparing masks for further image processing steps.
This parameter accepts the mask images that you want to process. A mask is typically a binary image where the areas of interest are marked. The node will apply dilation or erosion to these masks based on the other parameters provided.
The radius
parameter determines the extent of the dilation or erosion. It accepts integer values ranging from -1023 to 1023, with a default value of 0. Positive values will dilate (expand) the mask, while negative values will erode (shrink) it. The magnitude of the radius controls how much the mask is expanded or shrunk.
The shape
parameter specifies the form of the structuring element used for dilation or erosion. It can be either "box" or "circle". A "box" shape will use a rectangular structuring element, while a "circle" shape will use a circular one. This affects the appearance of the modified mask edges.
The output is a modified mask image where the areas have been either dilated or eroded based on the input parameters. This processed mask can be used in subsequent image processing steps to achieve the desired effects.
© Copyright 2024 RunComfy. All Rights Reserved.