Visit ComfyUI Online for ready-to-use ComfyUI environment
Enhance image contrast locally with CLAHE for improved visibility and noise control in various applications.
CLAHE, which stands for Contrast Limited Adaptive Histogram Equalization, is a powerful image processing technique designed to enhance the contrast of images. Unlike traditional histogram equalization, which applies a global transformation to the entire image, CLAHE works on small regions in the image, called tiles. This localized approach allows for better contrast enhancement in areas with varying lighting conditions, making it particularly useful for improving the visibility of details in both bright and dark regions of an image. CLAHE also includes a clip limit parameter to prevent over-amplification of noise, ensuring that the enhanced image remains visually pleasing and free from artifacts. This method is widely used in medical imaging, night vision, and other applications where enhancing local contrast is crucial.
The src
parameter represents the source image that you want to enhance using CLAHE. This input should be an image in a compatible format that the node can process.
The clip_limit
parameter controls the contrast enhancement limit. It prevents the amplification of noise by clipping the histogram at a specified value. The default value is 2, and it can be adjusted in steps of 1. A higher clip limit increases contrast but may introduce noise, while a lower clip limit reduces the risk of noise but may result in less contrast enhancement.
The tile_grid_x
parameter specifies the number of tiles in the horizontal direction. The default value is 8, with a minimum value of 2. This parameter determines the size of the local regions where histogram equalization is applied. Increasing the number of tiles can enhance local contrast but may also increase computational complexity.
The tile_grid_y
parameter specifies the number of tiles in the vertical direction. Similar to tile_grid_x
, the default value is 8, with a minimum value of 2. This parameter, along with tile_grid_x
, defines the grid size for local histogram equalization, affecting the balance between local contrast enhancement and computational load.
The output parameter IMAGE
represents the enhanced image after applying CLAHE. This image will have improved local contrast, making details in both bright and dark areas more visible. The output is in the same format as the input image, ensuring compatibility with subsequent processing steps.
clip_limit
parameter to balance between contrast enhancement and noise suppression. Start with the default value and increase or decrease it based on the visual quality of the output.tile_grid_x
and tile_grid_y
to find the optimal grid size for your specific image. Smaller tiles can enhance local details but may increase processing time.clip_limit
parameter is set to a value outside the acceptable range.clip_limit
parameter to be within the valid range, typically starting from 1 and increasing as needed.tile_grid_x
or tile_grid_y
are set too low, resulting in insufficient tiles for processing.tile_grid_x
and tile_grid_y
to at least 2 to ensure proper grid formation for local histogram equalization.tile_grid_x
or tile_grid_y
are set too high, causing excessive computational load or memory issues.tile_grid_x
and tile_grid_y
to a more manageable size, balancing between local contrast enhancement and computational efficiency.© Copyright 2024 RunComfy. All Rights Reserved.