Visit ComfyUI Online for ready-to-use ComfyUI environment
Identify and crop smallest region within a mask for focused view of least dominant area in images.
The Mask Crop Minority Region node is designed to identify and crop the smallest region within a given mask, providing a focused view of the least dominant area. This node is particularly useful for isolating and analyzing minor details or features within an image that might otherwise be overlooked. By cropping the minority region and optionally adding padding, you can ensure that even the smallest details are given prominence, which can be crucial for tasks that require detailed inspection or further processing of these regions. The node leverages image processing techniques to convert the mask to a binary format, label the regions, and identify the smallest one, ensuring precise and accurate cropping.
This parameter accepts the input mask(s) that you want to process. The mask should be in a format that the node can interpret, typically a binary or grayscale image where the regions of interest are highlighted. The node will analyze these masks to identify and crop the smallest region.
This parameter allows you to specify the amount of padding to add around the cropped minority region. Padding can help to ensure that the cropped region is not too tightly bound, providing some context around the smallest region. The default value is 24, with a minimum of 0 and a maximum of 4096. Adjusting this value can help to include more or less surrounding area in the cropped output.
The output of this node is the cropped mask(s) that focus on the smallest region identified within the input mask. This output retains the same format as the input mask but is resized and padded according to the specified parameters. The cropped masks can be used for further analysis or processing, providing a clear view of the minority regions.
© Copyright 2024 RunComfy. All Rights Reserved.