Visit ComfyUI Online for ready-to-use ComfyUI environment
Perform morphological operations on images for image enhancement, noise removal, and feature extraction using powerful functions like dilation and erosion.
The Morphology node is designed to perform various morphological operations on images, which are essential techniques in image processing and computer vision. These operations can help in enhancing image structures, removing noise, and extracting relevant features. The node leverages powerful functions such as dilation, erosion, opening, closing, gradient, top hat, and bottom hat to manipulate the shapes and structures within an image. By applying these operations, you can achieve effects like smoothing, sharpening, and highlighting specific elements in your images, making it a valuable tool for post-processing in AI art and other visual tasks.
This parameter represents the input image on which the morphological operations will be performed. The image should be in a format that the node can process, typically a tensor representation of the image.
This parameter specifies the type of morphological operation to be applied to the image. The available options are erode
, dilate
, open
, close
, gradient
, top_hat
, and bottom_hat
. Each operation has a distinct effect on the image: erode
shrinks the bright regions, dilate
expands them, open
removes small objects, close
fills small holes, gradient
highlights edges, top_hat
extracts small elements and details, and bottom_hat
highlights dark regions on a bright background.
This parameter defines the size of the structuring element (kernel) used in the morphological operation. It is an integer value with a default of 3, a minimum of 3, and a maximum of 999. The kernel size impacts the extent of the operation; larger kernels will have a more pronounced effect on the image.
The output parameter is the processed image after the specified morphological operation has been applied. This image will reflect the changes made by the operation, such as enhanced edges, reduced noise, or highlighted features, depending on the chosen operation.
open
operation with a small kernel size.gradient
operation can be very effective.dilate
operation to make features in the image more prominent.<operation>
for morphology. Must be one of 'erode', 'dilate', 'open', 'close', 'gradient', 'tophat', 'bottomhat'erode
, dilate
, open
, close
, gradient
, top_hat
, or bottom_hat
.© Copyright 2024 RunComfy. All Rights Reserved.