Visit ComfyUI Online for ready-to-use ComfyUI environment
Transform image with quadrilateral mask using homography for precise perspective mapping and creative manipulations.
The RemapFromQuadrilateral (homography) node is designed to transform an image based on a quadrilateral mask, effectively mapping the source image to a new perspective defined by the quadrilateral's four points. This node leverages homography, a powerful technique in computer vision, to achieve precise and flexible image transformations. By using this node, you can remap an image to fit within a specified quadrilateral, allowing for creative and complex manipulations such as perspective correction, image warping, and more. This is particularly useful for AI artists looking to apply sophisticated transformations to their images without needing to delve into the underlying mathematical complexities.
This parameter expects a mask image that contains exactly four points defining a quadrilateral. These points are used to calculate the homography matrix, which determines how the source image will be transformed. The mask should be in a format that the node can interpret, typically a binary image where the quadrilateral is clearly marked. The accuracy of these points directly impacts the quality of the transformation.
This parameter specifies the width of the output image after the transformation. It determines the horizontal dimension of the remapped image. The default value is 512, with a minimum of 16 and a maximum of 4096. Adjusting this value allows you to control the resolution and aspect ratio of the output image.
This parameter specifies the height of the output image after the transformation. It determines the vertical dimension of the remapped image. The default value is 512, with a minimum of 16 and a maximum of 4096. Similar to the width parameter, adjusting this value allows you to control the resolution and aspect ratio of the output image.
This output is the transformed image, remapped according to the quadrilateral defined in the input mask. It reflects the source image adjusted to fit within the specified quadrilateral, providing a new perspective or corrected view.
This output is the transformed mask, remapped in the same way as the source image. It ensures that any mask applied to the source image is accurately transformed to match the new perspective, maintaining consistency between the image and its mask.
This output is a placeholder and does not return any value. It is included to maintain compatibility with the underlying function structure.
© Copyright 2024 RunComfy. All Rights Reserved.