net.grelf.grip
Class BlobMask

java.lang.Object
  extended by net.grelf.image.ByteMask
      extended by net.grelf.grip.BlobMask

public class BlobMask
extends ByteMask

Holds a byte [][] for blob detection in a binary image. The byte array is made available for direct access when fast manipulation is required.


Field Summary
 
Fields inherited from class net.grelf.image.ByteMask
data, MASK_CLEAR, MASK_SET
 
Constructor Summary
BlobMask(byte[][] mask)
           
BlobMask(int width, int height)
           
 
Method Summary
 java.util.List<Blob> detectBlobs()
          Detect blobs in the mask, including 1-pixel ones.
 java.util.List<Blob> detectBlobs(boolean includeSinglePixelBlobs)
          Detect blobs in the mask, optionally including 1-pixel ones.
 java.lang.String toString()
          For diagnostics.
 
Methods inherited from class net.grelf.image.ByteMask
dilate, erode, getData, setData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BlobMask

public BlobMask(int width,
                int height)

BlobMask

public BlobMask(byte[][] mask)
Method Detail

detectBlobs

public java.util.List<Blob> detectBlobs()
Detect blobs in the mask, including 1-pixel ones. This operation clears all mask values to 0.


detectBlobs

public java.util.List<Blob> detectBlobs(boolean includeSinglePixelBlobs)
Detect blobs in the mask, optionally including 1-pixel ones. This operation clears all mask values to 0.


toString

public java.lang.String toString()
For diagnostics. Produces a large String showing all the values held in the mask, space-separated.

Overrides:
toString in class java.lang.Object