From SEG_ELT crop_region¶
Documentation¶
- Class name:
ImpactFrom_SEG_ELT_crop_region
- Category:
ImpactPack/Util
- Output node:
False
This node is designed to extract the bounding box coordinates from a given crop region of a segmented element. It serves as a utility within the ImpactPack to facilitate operations that require precise location information of a segment within an image.
Input types¶
Required¶
crop_region
- Specifies the crop region from which to extract the bounding box coordinates. This parameter is crucial for determining the exact area of interest within the segmented element.
- Comfy dtype:
SEG_ELT_crop_region
- Python dtype:
tuple
Output types¶
left
- Comfy dtype:
INT
- The left coordinate of the bounding box extracted from the crop region.
- Python dtype:
int
- Comfy dtype:
top
- Comfy dtype:
INT
- The top coordinate of the bounding box extracted from the crop region.
- Python dtype:
int
- Comfy dtype:
right
- Comfy dtype:
INT
- The right coordinate of the bounding box extracted from the crop region.
- Python dtype:
int
- Comfy dtype:
bottom
- Comfy dtype:
INT
- The bottom coordinate of the bounding box extracted from the crop region.
- Python dtype:
int
- Comfy dtype:
Usage tips¶
- Infra type:
CPU
- Common nodes: unknown
Source code¶
class From_SEG_ELT_crop_region:
@classmethod
def INPUT_TYPES(s):
return {"required": {
"crop_region": ("SEG_ELT_crop_region", ),
},
}
RETURN_TYPES = ("INT", "INT", "INT", "INT")
RETURN_NAMES = ("left", "top", "right", "bottom")
FUNCTION = "doit"
CATEGORY = "ImpactPack/Util"
def doit(self, crop_region):
return crop_region