Visit ComfyUI Online for ready-to-use ComfyUI environment
Enhance image contrast by adjusting intensity levels through stretching intensity range for improved visibility and detail enhancement.
The ImageMagick Contrast Stretch node is designed to enhance the contrast of an image by adjusting the intensity levels of the pixels. This process involves stretching the range of intensity values so that the darkest pixels become black and the brightest pixels become white, effectively increasing the overall contrast of the image. This technique is particularly useful for improving the visibility of details in images that appear washed out or have poor contrast. By specifying the black and white points, you can control the extent of the contrast enhancement, making it a versatile tool for various image enhancement tasks.
This parameter represents the input image that you want to apply the contrast stretch to. It accepts an image file in a supported format.
The black_point parameter defines the intensity level that will be mapped to black. Pixels with intensity values below this point will be set to black. The value ranges from 0.0 to 1024, with a default of 0.0. Adjusting this value can help in darkening the shadows and enhancing the contrast in darker regions of the image.
The white_point parameter specifies the intensity level that will be mapped to white. Pixels with intensity values above this point will be set to white. The value ranges from 0.0 to 1024, with a default of 0.0. Modifying this value can help in brightening the highlights and enhancing the contrast in lighter regions of the image.
This parameter allows you to select the specific color channel to apply the contrast stretch to. 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
. Choosing the appropriate channel can help in targeting specific color components for contrast enhancement.
The output is the enhanced image with the applied contrast stretch. This image will have improved contrast, with darker shadows and brighter highlights, making details more visible and the overall image more visually appealing.
ValueError: Invalid black_point or white_point value
TypeError: Unsupported image format
RuntimeError: Channel selection not applicable
© Copyright 2024 RunComfy. All Rights Reserved.