class Line – Line object

The line object is an attrtuple returned by Image.find_lines(), Image.find_line_segments(), or Image.get_regression(). It has 8 fields accessible as attributes or by index [0..7].

class image.line

Please call Image.find_lines(), Image.find_line_segments(), or Image.get_regression() to create this object.

x1() int

Returns the line’s p1 x component. Index [0].

y1() int

Returns the line’s p1 y component. Index [1].

x2() int

Returns the line’s p2 x component. Index [2].

y2() int

Returns the line’s p2 y component. Index [3].

length() int

Returns the line’s length: round(sqrt((x2-x1)^2 + (y2-y1)^2)). Index [4].

magnitude() int

Returns the magnitude of the line from the Hough transform. Index [5].

theta() int

Returns the angle of the line from the Hough transform (0-179 degrees). Index [6].

rho() int

Returns the rho value for the line from the Hough transform. Index [7].