Nodes/ComfyUI_BaiKong_Node/BK Image Rect Layout
ComfyUI Node

BK Image Rect Layout

Find the bounding rectangle of black elements in the input image and place a suitable image from the image list within it. 在输入的白色背景图片中找到所有黑色元素的边界矩形,并将符合该矩形长宽比的图片等比缩放并居中放置其中。

By JayLyu·Created 2 years ago·Updated 2 years ago· 8
BK Image Rect Layout
  • background_image
  • image_list
  • IMAGE
  • RECT_PREVIEW
  • REMAINING_IMAGE_LIST
aspect_ratio_threshold0.25
use_background_if_no_matchtrue
Category⭐️ Baikong/Image

Inputs (4)

NameTypeDefaultDescription
background_imageIMAGE
image_listIMAGE_LIST
aspect_ratio_thresholdoptFLOAT0.250.01–0.5
use_background_if_no_matchoptBOOLEANtrue

Outputs (3)

NameTypeDescription
IMAGEIMAGE
RECT_PREVIEWIMAGE
REMAINING_IMAGE_LISTIMAGE_LIST