Class SplitMergeLineFitLoop

java.lang.Object
boofcv.alg.shapes.polyline.splitmerge.SplitMergeLineFit
boofcv.alg.shapes.polyline.splitmerge.SplitMergeLineFitLoop

@Deprecated public class SplitMergeLineFitLoop extends SplitMergeLineFit
Deprecated.
Implementation of SplitMergeLineFit for looped lists of points. The beginning and end of the list are assumed to be connected. An additional check is done in the start to find two points which are far apart.
  • Field Details

    • N

      protected int N
      Deprecated.
  • Constructor Details

  • Method Details

    • _process

      public boolean _process(List<Point2D_I32> contour)
      Deprecated.
      Specified by:
      _process in class SplitMergeLineFit
    • splitPixels

      protected void splitPixels(int indexStart, int length)
      Deprecated.
      Recursively splits pixels between indexStart to indexStart+length. A split happens if there is a pixel more than the desired distance away from the two end points. Results are placed into 'splits'
    • selectFarthest

      protected int selectFarthest(List<Point2D_I32> contour)
      Deprecated.
      Computes the distance between pairs of points which are separated by 1/2 the contour list. The index of the first pixel in the pair with the greatest distance is returned
      Returns:
      Index of the first pixel which should be used to split the list. The other end is ret + N/2
    • mergeSegments

      protected boolean mergeSegments()
      Deprecated.
      Merges lines together if the common corner is close to a common line
      Returns:
      true the list being changed
    • splitSegments

      protected boolean splitSegments()
      Deprecated.
      Splits a line in two if there is a point that is too far away
      Returns:
      true for change
    • selectSplitOffset

      protected int selectSplitOffset(int indexStart, int length)
      Deprecated.
      Finds the point between indexStart and the end point which is the greater distance from the line (set up prior to calling). Returns the index of the element with a distances greater than tolerance, otherwise -1
      Returns:
      Selected offset from start of the split. -1 if no split was selected
    • circularDistance

      protected int circularDistance(int start, int end)
      Deprecated.
      Distance the two points are apart in clockwise direction