Visit ComfyUI Online for ready-to-use ComfyUI environment
Enhance image contrast by dynamically separating foreground from background using adaptive thresholding.
The ImageMagick Adaptive Threshold node is designed to process images by applying an adaptive thresholding technique. This method is particularly useful for enhancing the contrast of images, especially those with varying lighting conditions. By dynamically adjusting the threshold value based on the local mean of the pixel values within a specified window, it effectively separates the foreground from the background. This node is ideal for tasks such as edge detection, text recognition, and other image preprocessing steps where clear distinction between different regions of the image is crucial.
This parameter accepts the input image that you want to process. The image should be in a compatible format that the node can handle.
This parameter defines the width of the window used for calculating the local mean. The width can range from a minimum of 1 to a maximum of 1024, with a default value of 512. Adjusting this value affects the granularity of the thresholding process.
This parameter specifies the height of the window used for calculating the local mean. Similar to the width, the height can range from 1 to 1024, with a default value of 512. Modifying this value influences the local thresholding effect.
This parameter sets the offset value that is subtracted from the local mean to determine the threshold. The offset can range from 0.0 to 1024, with a default value of 0.0 and a step size of 0.01. Increasing the offset can make the thresholding more aggressive, while decreasing it can make it more conservative.
The output parameter is the processed image with the adaptive threshold applied. This image will have enhanced contrast, making it easier to distinguish between different regions based on the local thresholding technique.
width
and height
values to find the optimal window size for your specific image. Smaller windows can capture finer details, while larger windows can smooth out noise.offset
parameter to fine-tune the thresholding effect. A higher offset can help in cases where the background is not uniform, while a lower offset can be useful for images with consistent lighting.Image format not supported
Invalid width or height value
Offset value out of range
Image processing failed
© Copyright 2024 RunComfy. All Rights Reserved.