Package boofcv.alg.fiducial.dots
Class RandomDotMarkerGenerator
java.lang.Object
boofcv.alg.fiducial.dots.RandomDotMarkerGenerator
- Direct Known Subclasses:
RandomDotMarkerGeneratorImage
Renders Uchiya Markers
-
Field Summary
Modifier and TypeFieldDescriptionprotected final RectangleLength2D_F64
Region inside the document that the marker being rendered is specified to be inside ofprotected FiducialRenderEngine
used to draw the fiducial -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<Point2D_F64>
createRandomMarker
(Random rand, int num, double markerWidth, double markerHeight, double dotDiameter) Randomly generates a marker within the allowed region.void
render
(List<Point2D_F64> dots, double markerWidth, double markerHeight) Renders the marker.
-
Field Details
-
render
used to draw the fiducial -
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.- Parameters:
rand
- Random number generatornum
- Number of dotsmarkerWidth
- Length of the marker along the x-axismarkerHeight
- Length of the marker along the y-axisdotDiameter
- The dot's diameter
-
render
Renders the marker. Automatically scales of offsets to fit inside the document's coordinate system- Parameters:
dots
- dots on the marker. They should be inside a region -width/2 to width/2.
-