HoughLine Struct
A straight line found by ImageProcessingExtensions.DetectLines, in normal form: the points (x, y) with x cos θ + y sin θ = ρ.
public readonly struct HoughLine : IEquatable<HoughLine>Remarks
The coordinates are those of the stored pixels, where the frame covers [0, width] x [0, height] and the center of pixel (i, j) is (i + 1/2, j + 1/2); y grows downward. An angle of 0 is a vertical line (x = ρ), an angle of 90 a horizontal one (y = ρ).
- Implements
Constructors
| Name | Description |
|---|---|
| HoughLine(double, double, int) | Initializes a new instance of the HoughLine struct. |
HoughLine(double, double, int)
HoughLine.csInitializes a new instance of the HoughLine struct.
Properties
| Name | Description |
|---|---|
| Angle | Gets the angle θ of the normal of the line, in degrees, from 0 (included) to 180 (excluded), clockwise from the x axis since y grows downward. |
| Distance | Gets the signed distance ρ of the line to the origin (the top-left corner of the frame), in pixels. |
| Slope | Gets the angle of the direction of the line, in degrees, from -90 (excluded) to 90 (included): 0 for a horizontal line, positive when it goes down to the right (clockwise, since y grows downward). |
| Votes | Gets the number of edge pixels that voted for the line: the length of the visible part of the line, roughly. |
Angle
HoughLine.csDistance
HoughLine.csSlope
HoughLine.csVotes
HoughLine.csMethods
| Name | Description |
|---|---|
| Equals(HoughLine) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Indicates whether this instance and a specified object are equal. |
| GetHashCode() | Returns the hash code for this instance. |
| ToString() | Returns the line formatted as θ={Angle} ρ={Distance} ({Votes} votes). |
GetHashCode()
HoughLine.csToString()
HoughLine.csOperators
| Name | Description |
|---|---|
| operator ==(HoughLine, HoughLine) | Compares two lines for equality. |
| operator !=(HoughLine, HoughLine) | Compares two lines for inequality. |