imageCropFromMask
The imageCropFromMask node crops an input image and mask to the bounding box of the mask, then outputs the cropped image, cropped mask, and the bounding box coo...
image Crop From Mask
The imageCropFromMask node crops an input image and mask to the bounding box of the mask, then outputs the cropped image, cropped mask, and the bounding box coordinates. It is grouped under EasyUse/Image and is useful for isolating a masked subject for further processing or compositing.
Inputs
-
image (
IMAGE, required)
The full-resolution input image to crop. -
mask (
MASK, required)
The mask used to determine the crop region. The node crops to the bounding box enclosing the mask area. -
image_crop_multi (
FLOAT, required)
Multiplier applied to the mask bounding box when cropping the image.
Default:1· Min:0· Max:10· Step:0.001A value of
1crops the image exactly to the mask bounding box. Larger values expand the crop to include surrounding context; smaller values shrink it. -
mask_crop_multi (
FLOAT, required)
Multiplier applied to the mask bounding box when cropping the mask.
Default:1· Min:0· Max:10· Step:0.001This works independently from
image_crop_multi, so the image and mask outputs can use different crop sizes. -
bbox_smooth_alpha (
FLOAT, required)
Smoothing factor for the bounding box across frames.
Default:1· Min:0· Max:1· Step:0.01A value of
1uses the current frame's bounding box directly. Lower values blend the current bounding box with previous ones, which can reduce jitter in image sequences or animations.
Outputs
-
IMAGE
The input image cropped to the mask bounding box, withimage_crop_multiapplied to the crop size. -
MASK
The input mask cropped to the mask bounding box, withmask_crop_multiapplied to the crop size. -
BBOX
The bounding box coordinates used for the crop. This can be passed to other nodes that expect aBBOXvalue.
Usage Notes
- All inputs are required.
image_crop_multiandmask_crop_multiare independent, so you can create a relaxed image crop with extra context while keeping the mask output tight to the original mask, or vice versa.- If the two multipliers differ, the output image and output mask may have different dimensions.
bbox_smooth_alphais especially useful when processing image sequences where the mask bounding box changes rapidly between frames.
Comments
Sign in with GitHub to join the discussion.