ComfyUI  >  Nodes  >  Bmad Nodes >  BuildColorRangeAdvanced (hsv)

ComfyUI Node: BuildColorRangeAdvanced (hsv)

Class Name

BuildColorRangeAdvanced (hsv)

Category
Bmad/CV/Color A.
Author
bmad4ever (Account age: 3591 days)
Extension
Bmad Nodes
Latest Updated
8/2/2024
Github Stars
0.1K

How to Install Bmad Nodes

Install this extension via the ComfyUI Manager by searching for  Bmad Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Bmad Nodes in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

BuildColorRangeAdvanced (hsv) Description

Create precise HSV color ranges for segmentation and filtering tasks with advanced hue interval and saturation/value bounds determination.

BuildColorRangeAdvanced (hsv):

The BuildColorRangeAdvanced (hsv) node is designed to help you create precise color ranges in the HSV (Hue, Saturation, Value) color space. This node is particularly useful for tasks that require color-based segmentation or filtering, such as isolating specific colors in an image or creating masks based on color criteria. By leveraging advanced methods to determine hue intervals and saturation/value bounds, this node provides flexibility and accuracy in defining color ranges. It supports various hue modes, allowing you to choose the most appropriate method for your specific needs, whether you want to ignore hue, use a single interval, or split the hue range for more complex scenarios.

BuildColorRangeAdvanced (hsv) Input Parameters:

rgb_image

This parameter represents the input image in RGB format that you want to process. The image will be converted to the HSV color space for further operations. The quality and resolution of the input image can impact the accuracy of the color range detection.

sample_size

This parameter defines the number of pixels to sample from the input image for color range analysis. A higher sample size can provide more accurate results but may increase processing time. The default value is 1000, with a minimum of 1 and a maximum of 65536.

sampling_seed

This parameter sets the seed for the random number generator used in pixel sampling. By setting a specific seed, you can ensure reproducibility of the sampling process. The default value is 0, with a minimum of 0 and a maximum value determined by the system's maximum integer size.

color_a

This parameter represents the first color in the HSV color space that defines one end of the color range. It is crucial for determining the bounds of the hue, saturation, and value intervals.

color_b

This parameter represents the second color in the HSV color space that defines the other end of the color range. Together with color_a, it helps in establishing the range of colors to be included.

interval_to_select

This parameter determines whether to select the smallest or largest hue interval when defining the color range. It can be set to either SMALLEST_HUE_INTERVAL or LARGEST_HUE_INTERVAL, depending on your specific requirements.

BuildColorRangeAdvanced (hsv) Output Parameters:

upper_bounds

This output parameter provides the upper bounds of the color range in the HSV color space. It is an array containing the maximum values for hue, saturation, and value that define the color range.

lower_bounds

This output parameter provides the lower bounds of the color range in the HSV color space. It is an array containing the minimum values for hue, saturation, and value that define the color range.

hue_mode

This output parameter indicates the hue mode used to determine the color range. It can be one of several modes, such as SMALLEST, LARGEST, IGNORE, SINGLE, or SPLIT, each offering a different approach to handling the hue interval.

BuildColorRangeAdvanced (hsv) Usage Tips:

  • To achieve the most accurate color range, use a higher sample size, especially for images with complex color distributions.
  • Experiment with different hue modes to find the one that best suits your specific task. For instance, use IGNORE if hue is not important, or SPLIT for more complex color ranges.
  • Set a specific sampling seed if you need to reproduce the same results consistently, which is useful for debugging or iterative testing.

BuildColorRangeAdvanced (hsv) Common Errors and Solutions:

"Invalid sample size"

  • Explanation: The sample size provided is either too low or exceeds the maximum allowed value.
  • Solution: Ensure that the sample size is within the range of 1 to 65536.

"Invalid sampling seed"

  • Explanation: The sampling seed provided is outside the acceptable range.
  • Solution: Set the sampling seed to a value between 0 and the system's maximum integer size.

"Color bounds out of range"

  • Explanation: The provided color values for color_a or color_b are outside the valid HSV range.
  • Solution: Ensure that the hue values are between 0 and 179, and the saturation and value are between 0 and 255.

BuildColorRangeAdvanced (hsv) Related Nodes

Go back to the extension to check out more related nodes.
Bmad Nodes
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.