net.grelf.grip
Class BlobMask
java.lang.Object
net.grelf.image.ByteMask
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.
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BlobMask
public BlobMask(int width,
int height)
BlobMask
public BlobMask(byte[][] mask)
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