Visit ComfyUI Online for ready-to-use ComfyUI environment
Crop images based on specified bounding coordinates for precise manipulation and isolation of regions, supporting batch processing.
The Bounded Image Crop node is designed to crop images based on specified bounding coordinates, allowing you to focus on specific regions of interest within an image. This node is particularly useful for tasks that require precise image manipulation, such as isolating objects or regions for further processing or analysis. By providing bounding coordinates, you can ensure that only the desired portion of the image is retained, which can be beneficial for improving the efficiency and accuracy of subsequent image processing steps. The node supports batch processing, making it suitable for handling multiple images simultaneously.
This parameter represents the input image or a batch of images that you want to crop. The image should be in a tensor format, and the node will handle both single images and batches of images. The cropping operation will be applied to each image in the batch based on the corresponding bounding coordinates provided.
This parameter specifies the bounding coordinates for cropping the image. The bounds should be provided as a list of tuples, where each tuple contains four values: rmin
, rmax
, cmin
, and cmax
. These values represent the minimum and maximum row indices and the minimum and maximum column indices, respectively. The bounds determine the region of the image that will be retained after cropping. If the number of bounds does not match the number of images, the first set of bounds will be used for all images.
The output of this node is a tensor containing the cropped images. Each image in the output tensor corresponds to an input image that has been cropped based on the specified bounding coordinates. The cropped images retain the same number of channels as the input images, ensuring that the color information is preserved.
image_bounds
are within the dimensions of the input image to avoid errors.rmin
, rmax
, cmin
, and cmax
values are within the valid range for the image dimensions. Adjust the bounds to ensure they fall within the image size.top
, left
, right
, and bottom
to ensure they define a valid cropping region. Adjust the values to create a region with positive width and height.© Copyright 2024 RunComfy. All Rights Reserved.