Visit ComfyUI Online for ready-to-use ComfyUI environment
Adjust color distribution of target images to match reference image, ensuring consistency and uniform look in various applications.
The HistogramMatching node is designed to adjust the color distribution of one or more target images to match the color distribution of a reference image. This process, known as histogram matching, is particularly useful in image processing tasks where you want to ensure consistency in color tones across different images. By aligning the histograms of the target images with that of the reference image, this node helps in achieving a uniform look and feel, which is essential in various applications such as photo editing, medical imaging, and computer vision. The node leverages advanced techniques to perform this operation efficiently, ensuring that the resulting images maintain their visual quality while adopting the desired color characteristics from the reference image.
This parameter represents the reference image whose color distribution will be used as the standard for matching. The reference image should be provided in an appropriate format, typically as an image tensor. The quality and characteristics of this image will directly influence the outcome of the histogram matching process.
This parameter consists of one or more target images that need to be adjusted to match the color distribution of the reference image. These images should be provided in a list format, and each image will undergo the histogram matching process to align its color distribution with that of the reference image.
This parameter controls the extent to which the target images' histograms are adjusted to match the reference image's histogram. It is a floating-point value ranging from 0 to 1, with a default value of 0.75. A value of 1 means a full match to the reference histogram, while a value closer to 0 means a lesser degree of matching.
This parameter specifies the color channels to be considered during the histogram matching process. It is provided as a string, with the default value being "0,1,2", which corresponds to the RGB channels. You can customize this parameter to include only specific channels if needed.
The output of the HistogramMatching node is a list of images that have been adjusted to match the color distribution of the reference image. These images are returned as tensors, ready for further processing or saving. The resulting images will have their color tones aligned with the reference image, ensuring a consistent visual appearance.
matching_fraction
parameter to fine-tune the degree of histogram matching based on your specific needs. A value of 1 will fully match the reference image, while lower values will blend the original and reference histograms.channels
parameter to focus on specific color channels if you only need to match certain aspects of the image's color distribution.<path>
<dtype>
np.float32
or np.uint8
before attempting to write it to disk. Convert the image to the appropriate data type if necessary.<directory>
does not exist© Copyright 2024 RunComfy. All Rights Reserved.