ComfyUI > Nodes > ComfyUI 1hewNodes > Detect Guide Line

ComfyUI Node: Detect Guide Line

Class Name

1hew_DetectGuideLine

Category
1hewNodes/detect
Author
1hew (Account age: 1113days)
Extension
ComfyUI 1hewNodes
Latest Updated
2026-04-17
Github Stars
0.03K

How to Install ComfyUI 1hewNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI 1hewNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI 1hewNodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Detect Guide Line Description

Detects and highlights guide lines in images for artists using edge and line detection.

Detect Guide Line:

The 1hew_DetectGuideLine node is designed to detect and highlight guide lines within an image, which can be particularly useful for artists and designers looking to identify structural elements or vanishing points in their compositions. This node leverages edge detection and line detection techniques to identify prominent lines in an image, which are then filtered and enhanced based on user-defined parameters. By doing so, it provides a visual guide that can assist in understanding the perspective and alignment within the image, making it a valuable tool for enhancing artistic compositions or analyzing the geometric structure of a scene.

Detect Guide Line Input Parameters:

image

This parameter represents the input image on which the guide line detection will be performed. It is the primary source of data for the node to process and analyze.

canny_low

The canny_low parameter sets the lower threshold for the Canny edge detection algorithm. It determines the minimum intensity gradient required for a pixel to be considered an edge. The value ranges from 0.0 to 1.0, with a default of 0.2. Lower values may result in more edges being detected, while higher values may reduce noise by ignoring weaker edges.

canny_high

The canny_high parameter sets the upper threshold for the Canny edge detection algorithm. It defines the maximum intensity gradient for edge detection. The value ranges from 0.0 to 1.0, with a default of 0.8. This parameter should be set higher than canny_low to ensure proper edge detection, with higher values focusing on stronger edges.

seg_min_len

This parameter specifies the minimum length of a line segment to be considered during the line detection process. It ranges from 1 to 300, with a default value of 40. Increasing this value will filter out shorter, potentially less significant lines, while decreasing it will allow more lines to be detected.

seg_max_gap

The seg_max_gap parameter defines the maximum gap between line segments that can be connected to form a single line. It ranges from 1 to 100, with a default of 8. Larger values allow for more discontinuous lines to be connected, while smaller values require lines to be more continuous.

guide_filter

This parameter controls the filtering of detected lines based on their alignment with a vanishing point. It ranges from 0.1 to 1.0, with a default of 0.6. Higher values result in stricter filtering, retaining only lines that closely align with the vanishing point, while lower values allow more lines to be included.

guide_width

The guide_width parameter sets the width of the guide lines drawn on the output image. It ranges from 1 to 100, with a default of 2. This affects the visual thickness of the lines, allowing for customization based on the desired emphasis.

cluster_eps

This parameter determines the maximum distance between points in a cluster for them to be considered as part of the same cluster. It ranges from 1 to 100, with a default of 30. This is used in clustering intersections to identify potential vanishing points, with larger values allowing for more dispersed clusters.

Detect Guide Line Output Parameters:

image

The image output is the processed version of the input image, with detected guide lines overlaid. This output provides a visual representation of the detected structural elements within the image.

line_image

The line_image output contains only the detected guide lines on a blank background. This can be useful for isolating the lines for further analysis or artistic manipulation.

line_mask

The line_mask output is a binary mask highlighting the areas of the image where guide lines have been detected. This can be used for masking operations or to further process the detected lines.

Detect Guide Line Usage Tips:

  • Adjust the canny_low and canny_high parameters to fine-tune edge detection based on the contrast and detail level of your image. Lower values may help in detecting more subtle lines.
  • Use the seg_min_len and seg_max_gap parameters to control the sensitivity of line detection, especially in images with varying line lengths and gaps.
  • Experiment with the guide_filter to balance between detecting all possible lines and focusing on those that align with a vanishing point, depending on your artistic needs.

Detect Guide Line Common Errors and Solutions:

No lines detected

  • Explanation: This error occurs when the node fails to detect any lines in the input image, possibly due to inappropriate parameter settings or low contrast in the image.
  • Solution: Adjust the canny_low and canny_high thresholds to better capture edges, and ensure the image has sufficient contrast. Also, consider lowering the seg_min_len to detect shorter lines.

Lines not aligned with vanishing point

  • Explanation: Detected lines may not align with the expected vanishing point due to incorrect guide_filter settings or image perspective.
  • Solution: Increase the guide_filter value to enforce stricter alignment with the vanishing point, and verify the image perspective is suitable for line detection.

Detect Guide Line Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI 1hewNodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Detect Guide Line