Class AdjustPolygonForThresholdBias

java.lang.Object
boofcv.alg.shapes.polygon.AdjustPolygonForThresholdBias

public class AdjustPolygonForThresholdBias extends 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/
  • Constructor Details

    • AdjustPolygonForThresholdBias

      public AdjustPolygonForThresholdBias()
  • Method Details

    • 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?