This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# ImageLines

 ImageLines[image]finds line segments in image and returns the coordinates of their endpoints. ImageLinesuses the threshold t for selecting image lines. ImageLinesuses the parameter d to control the distinctness of the detected lines.
• ImageLines returns a list of line segments where the are expressed in the standard image coordinates .
• ImageLines finds lines in the image whose normalized strength is larger than the specified threshold t.
• In ImageLines, the parameter d controls how close lines are suppressed. If the value is set to zero, all detected lines are returned. With d set to , only the strongest line may be returned.
• By default, ImageLines computes lines based on the Hough transform of the image, using the setting Method.
• Lines are detected by iteratively selecting the strongest peaks in the Hough transform. Using the distinctness parameter, peaks that are within a rectangular range from the already selected peaks are excluded from the set of line candidates.
• With Method, lines are detected using random sampling. For each sampling, pixels that are within a distance specified by the distinctness parameter d are used for computing the strength of the line. The pixels on the selected line are not used in the following iterations.
• By default, ImageLines returns lines that span from border to border. With a setting True, detected lines may be divided into smaller segments.
Detect and visualize straight trajectories in a bubble chamber image:
Detect the line going through the foreground pixels:
Detect and visualize straight trajectories in a bubble chamber image:
 Out[1]=

Detect the line going through the foreground pixels:
 Out[1]=
 Scope   (2)
Detect segments on a color image:
Specify the distinctness parameter:
 Options   (2)
Detect dashed lines in a grayscale image:
Use a random sampling method:
Segmented lines using the random sampling method:
 Applications   (3)
Visualize vanishing points:
Detect segments on a gradient magnitude map:
Find wide lines using edge detection:
Use the distinctness parameter to prevent detecting duplicated lines:
New in 8