Class BinaryThinning.Mask

java.lang.Object
boofcv.alg.filter.binary.impl.BinaryThinning.Mask
Direct Known Subclasses:
BinaryThinning.Mask0, BinaryThinning.Mask1, BinaryThinning.Mask2, BinaryThinning.Mask3, BinaryThinning.Mask4, BinaryThinning.Mask5, BinaryThinning.Mask6, BinaryThinning.Mask7
Enclosing class:
BinaryThinning

protected abstract class BinaryThinning.Mask extends Object
Abstract class for applying the mask. Uses sparse list of black pixels. Determines if the pixel is along the border or not. If border then generic code is code, otherwise optimized code is called.
  • Constructor Details

    • Mask

      protected Mask(byte[] mask)
  • Method Details

    • apply

      public void apply(DogArray_I32 onesIn, DogArray_I32 onesOut, DogArray_I32 zerosOut)
      Applies the mask.
      Parameters:
      onesIn - (input) Indexes of pixels with a value of 1
      onesOut - (output) Indexes of pixels with a value of 1 after the mask is applied
      zerosOut - (output) Indexes of pixels whose values have changed form 1 to 0
    • borderMask

      protected boolean borderMask(int cx, int cy)
      Slower code which uses a generic mask to handle image border
      Parameters:
      cx - x-coordinate of center pixels, always 1
      cy - y-coordinate of center pixels, always 1
      Returns:
      true means the pixels keeps the value of one, otherwise it is set to zero
    • innerMask

      protected abstract boolean innerMask(int indexIn)
      Specialized code optimized for the inner image
      Parameters:
      indexIn - Index of center pixels, always 1
      Returns:
      true means the pixels keeps the value of one, otherwise it is set to zero