Class ZhangSuenThinningStrategy

  • All Implemented Interfaces:
    ThinningStrategy

    public class ZhangSuenThinningStrategy
    extends Abstract3x3NeighbourhoodThinning
    Implementation of the thinning algorithm proposed by T. Y. Zhang and C. Y. Suen.
    Author:
    Andreas Burger, University of Konstanz
    Implementation Note:
    thinningstrategy names='ZhangSuen'
    • Constructor Detail

      • ZhangSuenThinningStrategy

        public ZhangSuenThinningStrategy()
      • ZhangSuenThinningStrategy

        public ZhangSuenThinningStrategy​(boolean foreground)
        Create a new Zhang-Suen thinning strategy. The passed boolean will represent the foreground-value of the image.
        Parameters:
        foreground - Value determining the boolean value of foreground pixels.
    • Method Detail

      • removePixel

        public boolean removePixel​(long[] position,
                                   RandomAccessible<BitType> accessible,
                                   int iteration)
        Description copied from interface: ThinningStrategy
        This method should determine whether to keep a foreground pixel or not.
        Parameters:
        position - Long Array containing the current position in the image.
        accessible - The image to thin.
        iteration - The iteration number.
        Returns:
        True if pixel can be switched to background, false otherwise.
      • copy

        public ThinningStrategy copy()
        Description copied from interface: ThinningStrategy
        Returns a separate copy of this strategy.
        Returns:
        A new instance of this strategy with the same values.