Visit ComfyUI Online for ready-to-use ComfyUI environment
Apply median filter to images for noise reduction while preserving edges, essential for enhancing image quality.
The MedianFilterImage
node is designed to apply a median filter to images, which is a common technique used in image processing to reduce noise while preserving edges. This filter works by replacing each pixel's value with the median value of the intensities in the surrounding neighborhood defined by the filter size. The primary benefit of using a median filter is its ability to effectively remove salt-and-pepper noise from images, making it particularly useful for cleaning up noisy images without significantly blurring the edges. This node is essential for AI artists looking to enhance the quality of their images by reducing noise while maintaining important details.
This parameter expects an input of type IMAGE
. It represents the image or batch of images to which the median filter will be applied. The images should be in a format compatible with the node's processing capabilities.
This parameter is an integer that defines the size of the median filter. The size determines the neighborhood around each pixel that will be considered when calculating the median value. The filter size is calculated as 2 * size + 1
, meaning a size of 1 results in a 3x3 filter, a size of 2 results in a 5x5 filter, and so on. The minimum value for this parameter is 1, the maximum is 1023, and the default value is 1. Adjusting this size can impact the level of noise reduction and the preservation of image details.
The output is an image or batch of images that have been processed by the median filter. The resulting images will have reduced noise, particularly salt-and-pepper noise, while maintaining the edges and important details. This output is useful for further image processing or as a final step to enhance image quality.
TypeError: Expected input type IMAGE
IMAGE
.images
parameter is a valid image or batch of images compatible with the node's requirements.ValueError: Size parameter out of range
size
parameter is set to a value outside the allowed range (1 to 1023).size
parameter to be within the valid range. The minimum value is 1, and the maximum value is 1023.RuntimeError: Image processing failed
© Copyright 2024 RunComfy. All Rights Reserved.