Visit ComfyUI Online for ready-to-use ComfyUI environment
Generate RGB channel histograms from image tensor for color analysis and processing tasks, providing valuable insights for image enhancement.
The LF_ImageHistogram node is designed to generate histograms for the RGB channels and their sum from an input image tensor. This node is particularly useful for analyzing the color distribution within an image, providing valuable insights into the image's color composition. By converting the image tensor into histograms, you can better understand the intensity distribution of each color channel (Red, Green, and Blue) and their combined effect. This can be beneficial for tasks such as image enhancement, color correction, and other image processing applications. The node formats the histogram data into a structured dataset, making it easy to integrate and utilize in further processing or analysis workflows.
The image
parameter expects an input image tensor in the shape [1, H, W, 3]. This tensor represents the image you want to analyze, where H
is the height, W
is the width, and 3
corresponds to the RGB color channels. The image tensor should be normalized, with pixel values typically ranging from 0 to 1. This parameter is crucial as it serves as the source data from which the histograms are generated. There are no specific minimum, maximum, or default values for this parameter, but it must be a valid image tensor in the specified shape.
The image
output parameter returns the original input image tensor. This allows you to pass the image along to subsequent nodes in your workflow without needing to re-load or re-process the image. It ensures that the image data remains accessible for further operations or analysis.
The dataset
output parameter provides a JSON-formatted dataset containing the histogram data for the RGB channels and their sum. This dataset includes the histograms for the Red, Green, and Blue channels, as well as a combined histogram that represents the sum of all three channels. The dataset is structured to be easily interpretable and can be used for various analytical purposes, such as visualizing the color distribution or performing statistical analysis on the image's color composition.
dataset
output to visualize the histograms and gain insights into the color distribution of your image, which can be helpful for tasks like color correction or enhancement..cpu()
before passing it to the node.© Copyright 2024 RunComfy. All Rights Reserved.