Visit ComfyUI Online for ready-to-use ComfyUI environment
Detect edges in images using Canny edge detection algorithm for precise feature manipulation.
The CannyEdgeMask node is designed to detect edges within an image using the Canny edge detection algorithm, a popular technique in computer vision. This node processes an input image to highlight areas of significant intensity change, which typically correspond to edges. By converting the image to grayscale and applying the Canny algorithm, it produces a binary mask where edges are marked, making it easier to identify and manipulate these features in subsequent processing steps. This node is particularly useful for tasks that require precise edge detection, such as object recognition, image segmentation, and artistic effects.
The image
parameter is the input image that you want to process. This image should be in the form of a tensor, typically containing RGB values. The node will convert this image to grayscale before applying the Canny edge detection algorithm.
The lower_threshold
parameter sets the lower bound for the hysteresis thresholding in the Canny edge detection algorithm. Pixels with gradient values below this threshold are considered non-edges. Adjusting this value can help control the sensitivity of edge detection. The minimum value is 0, the maximum value is 500, and the default value is 100. This parameter is an integer and can be adjusted in steps of 10.
The upper_threshold
parameter sets the upper bound for the hysteresis thresholding in the Canny edge detection algorithm. Pixels with gradient values above this threshold are considered strong edges. Adjusting this value can help control the sensitivity of edge detection. The minimum value is 0, the maximum value is 500, and the default value is 200. This parameter is an integer and can be adjusted in steps of 10.
The output is an IMAGE
parameter, which is a binary mask highlighting the edges detected in the input image. Each pixel in the output image will either be part of an edge (marked with a high value) or not (marked with a low value). This mask can be used for further image processing tasks, such as segmentation or feature extraction.
lower_threshold
and upper_threshold
parameters to fine-tune the sensitivity of the edge detection. Lower values will detect more edges, including weaker ones, while higher values will focus on stronger edges.lower_threshold
or upper_threshold
values are outside the allowed range.© Copyright 2024 RunComfy. All Rights Reserved.