public class ByteMask
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected byte[][] |
data |
static byte |
MASK_CLEAR |
static byte |
MASK_SET
For the blob detection mechanism to work, thresholding/segmentation must
set value 3 at all detected pixels and 0 at all others.
|
Constructor and Description |
---|
ByteMask(byte[][] mask)
Construct with a reference to an external byte array.
|
ByteMask(int width,
int height)
Construct an empty mask of the given dimensions.
|
Modifier and Type | Method and Description |
---|---|
void |
dilate()
Operation on mask.
|
void |
erode()
Operation on mask.
|
byte[][] |
getData()
Get a reference to the mask array itself.
|
java.util.List<Line> |
houghLines()
Apply a Hough transform to detect straight line segments in this mask.
|
void |
setData(byte[][] aMask)
Set the mask array.
|
public static final byte MASK_SET
public static final byte MASK_CLEAR
protected byte[][] data
public ByteMask(int width, int height)
public ByteMask(byte[][] mask)
public byte[][] getData()
public void setData(byte[][] aMask)
public void dilate()
public void erode()
public java.util.List<Line> houghLines()