Line Detector

This function block is for detecting lines in images using different line detection techniques. It provides options to select the detection method and to configure parameters that affect line detection.

πŸ“₯ Inputs

Image Any The input image in which lines will be detected.

πŸ“€ Outputs

Lined Image The output image with detected lines drawn on it.

Number of Lines The total count of lines that were detected in the input image.

Lines Provides the coordinates of the detected lines, which can be used for further processing.

πŸ•ΉοΈ Controls

Line Detection Type A dropdown menu to select the detection method: either "Deterministic" or "Probabilistic".

Confidence A slider to set the sensitivity threshold for the line detection process.

Min. Line Gap A slider to set the minimum distance between detected line segments (applicable for the Probabilistic method).

Max. Line Gap A slider to define the maximum distance between segments to treat them as a single line (applicable for the Probabilistic method).

🎨 Features

Two Line Detection Methods Users can choose between two line detection methods, allowing flexibility based on the image content.

Dynamic Parameter Adjustment Adjustability of parameters like confidence and gaps provides control over the line detection process to cater for various types of images.

Visual Output Lines detected are visually represented on the output image, making it easy to analyze results.

πŸ“ Usage Instructions

  1. Input an Image: Connect any image to the Image Any input.

  2. Select Detection Method: Choose between "Deterministic" or "Probabilistic" from the Line Detection Type dropdown.

  3. Adjust Parameters: Use the sliders to set confidence, minimum line gap, and maximum line gap according to your requirements.

  4. Run the Block: Evaluate the block to detect lines in the image.

πŸ“Š Evaluation

Upon evaluation, the function block processes the input image for line detection based on the specified parameters, returning the modified image, line count, and detected line coordinates.

πŸ’‘ Tips and Tricks

Using Gaussian Blur

Applying a Gaussian blur on the input image prior to line detection can help reduce noise, improving detection results.

Experiment with Threshold

Adjust the Confidence slider to find the best threshold value for line detection. A lower value could detect more lines while a higher value may filter out noise.

Using Proper Image Formats

Ensure that the input image is properly formatted; if it is colored, the block will automatically convert it to grayscale.

Testing on Various Images

For best results, test the line detector on images with distinct and clear lines. Complex backgrounds can affect detection accuracy.

πŸ› οΈ Troubleshooting

No Lines Detected

If no lines are detected, try adjusting the threshold (Confidence) slider as well as using images that have clear lines.

Excessive Noise in Output

If excessive or irrelevant lines are detected, consider adding preprocessing steps like blurring or thresholding the image before line detection.

Last updated