Visit ComfyUI Online for ready-to-use ComfyUI environment
Converts image to binary by setting pixels above threshold to white and below to black, useful for high-contrast images.
The ImageMagick Threshold node is designed to convert an image into a binary image by applying a threshold value. This process involves setting all pixels in the image that are above the threshold to white and all pixels below the threshold to black. This node is particularly useful for creating high-contrast images, isolating objects, or preparing images for further processing steps such as edge detection or object recognition. By adjusting the threshold value, you can control the level of detail and contrast in the resulting image, making it a versatile tool for various image processing tasks.
This parameter accepts the input image that you want to process. The image should be in a format compatible with the node, typically an IMAGE type.
This parameter sets the threshold value used to determine which pixels are converted to white and which are converted to black. The value ranges from 0.0 to 1024, with a default of 0.5. A lower threshold value will result in more pixels being converted to white, while a higher value will convert more pixels to black.
This parameter specifies the color channel to which the threshold will be applied. Options include undefined
, red
, gray
, cyan
, green
, magenta
, blue
, yellow
, black
, alpha
, opacity
, index
, readmask
, write_mask
, meta
, composite_channels
, all_channels
, true_alpha
, rgb
, rgb_channels
, gray_channels
, sync_channels
, and default_channels
. The default is red
. Selecting different channels allows you to apply the threshold to specific color components of the image.
The output is a binary image where pixels are either white or black based on the threshold value. This high-contrast image can be used for further image processing tasks or as a final output for specific artistic effects.
channel
parameter to apply the threshold to specific color components, which can be useful for isolating certain features in a multi-colored image.Invalid image format
Threshold value out of range
Unsupported channel type
© Copyright 2024 RunComfy. All Rights Reserved.