Class RandomDotMarkerGenerator

Direct Known Subclasses:

public class RandomDotMarkerGenerator extends Object
Renders Uchiya Markers
  • Field Details

    • render

      protected FiducialRenderEngine render
      used to draw the fiducial
    • documentRegion

      protected final RectangleLength2D_F64 documentRegion
      Region inside the document that the marker being rendered is specified to be inside of
  • Constructor Details

    • RandomDotMarkerGenerator

      public RandomDotMarkerGenerator()
  • Method Details

    • createRandomMarker

      public static List<Point2D_F64> createRandomMarker(Random rand, int num, double markerWidth, double markerHeight, double dotDiameter)
      Randomly generates a marker within the allowed region. Ensures that dots do not overlap or touch the marker's border.
      rand - Random number generator
      num - Number of dots
      markerWidth - Length of the marker along the x-axis
      markerHeight - Length of the marker along the y-axis
      dotDiameter - The dot's diameter
    • render

      public void render(List<Point2D_F64> dots, double markerWidth, double markerHeight)
      Renders the marker. Automatically scales of offsets to fit inside the document's coordinate system
      dots - dots on the marker. They should be inside a region -width/2 to width/2.