Class HoughLine

All Implemented Interfaces:
Primitive2d, ShapeProducer, Comparable<HoughLine>

public class HoughLine extends HessianLine implements Comparable<HoughLine>

This class represents a straight line of the form (x - xRef) * cos(angle) + (y - yRef) * sin(angle) = radius. It is used by the Hough transform (see HoughTransformLines). It inherits from HessianLine which is, in turn, a subclass of AlgebraicLine. It adds an arbitrary reference point (xRef, yRef) and a counter (count) for pixel votes. Instances are immutable. See Sec. 12.2 of [1] for additional details.

[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).

Version:
2022/08/24
  • Constructor Details

    • HoughLine

      public HoughLine(double angle, double radius, double xRef, double yRef, int count)
      Constructor, creates a new HoughLine instance from the specified HessianLine parameters (angle, radius), an arbitrary reference point (xRef, yRef) and count.
      Parameters:
      angle - the line's normal angle (see HessianLine)
      radius - the line's radius (distance to reference point)
      xRef - reference point x-coordinate
      yRef - reference point y-coordinate
      count - pixel votes for this line
    • HoughLine

      public HoughLine(AlgebraicLine line, double xRef, double yRef, int count)
      Constructor, creates a new HoughLine instance from a given AlgebraicLine (or any subclass) instance. The line parameters are adjusted to the specified reference point (actually only parameter c is modified, since a change of reference point effects only a shift of the line). The two lines are equivalent, i.e., contain the same points (x,y). Thus the distance from a given point (x,y) is the same from the original line and the new line.
      Parameters:
      line - an existing line (AlgebraicLine or subclass)
      xRef - reference point x-coordinate
      yRef - reference point y-coordinate
      count - pixel votes for this line
    • HoughLine

      public HoughLine(AlgebraicLine line)
      Convenience constructor, creates a new HoughLine instance from a given AlgebraicLine (or any subclass) instance with the same reference point as the original line and zero count.
      Parameters:
      line - a AlgebraicLine instance
  • Method Details