Class AdjustPolygonForThresholdBias


  • public class AdjustPolygonForThresholdBias
    extends java.lang.Object
    When a binary image is created some of the sides are shifted up to a pixel. This is due to how the image is discretized. What this algorithm does is adjust the polygon to move the bias by basically undoing the floor() operation/
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void process​(Polygon2D_F64 polygon, boolean clockwise)
      Processes and adjusts the polygon.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AdjustPolygonForThresholdBias

        public AdjustPolygonForThresholdBias()
    • Method Detail

      • process

        public void process​(Polygon2D_F64 polygon,
                            boolean clockwise)
        Processes and adjusts the polygon. If after adjustment a corner needs to be removed because two sides are parallel then the size of the polygon can be changed.
        Parameters:
        polygon - The polygon that is to be adjusted. Modified.
        clockwise - Is the polygon in a lockwise orientation?