Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates color detection and segmentation in images using HSV color space, specifying range of values for isolation.
The InRange (hsv) node is designed to facilitate color detection and segmentation within images by leveraging the HSV (Hue, Saturation, Value) color space. This node allows you to specify a range of HSV values to isolate specific colors or color ranges within an image. By setting both lower and upper bounds for hue, saturation, and value, you can create masks that highlight areas of the image that fall within the specified color range. This is particularly useful for tasks such as object detection, image filtering, and color-based image analysis. The node provides various methods to handle hue intervals, including ignoring hue, using a single interval, or splitting the interval to ensure accurate color detection.
This parameter represents the HSV samples extracted from an image. It is used to determine the color range for the inRange operation. The samples are typically obtained from a previous node that samples colors from an image.
This integer parameter adjusts the range of HSV values based on a percentage. It allows you to fine-tune the sensitivity of the color detection. The default value is 50, with a minimum of 1 and a maximum of 100. Increasing this value broadens the range, making the node more inclusive of similar colors, while decreasing it narrows the range for more precise color detection.
This parameter specifies the method used to calculate the HSV interval. It offers several options, including "median to extremes interpolation," "average +- 3x max deviation," "average +- 2x standard deviation," and "sample percentage centered at median." Each option determines how the HSV bounds are calculated based on the provided samples and percentage modifier. The default option is "median to extremes interpolation."
This output represents the upper bounds of the HSV color range. It is an array containing the maximum values for hue, saturation, and value that define the color range.
This output represents the lower bounds of the HSV color range. It is an array containing the minimum values for hue, saturation, and value that define the color range.
This output indicates the hue mode used for the inRange operation. It can be one of several modes, such as "SMALLEST," "LARGEST," "IGNORE," "SINGLE," or "SPLIT," each determining how the hue interval is handled during the color detection process.
© Copyright 2024 RunComfy. All Rights Reserved.