public class ImageBlocker
extends java.lang.Object
Constructor and Description |
---|
ImageBlocker(java.lang.String fileName)
Constructor: an imageblocker for image with name fileName.
|
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<Block> |
getBlocks()
Return the nonempty Blocks of the image.
|
java.util.ArrayList<java.util.HashSet<Block>> |
getLargeConnectedComponents(double sizeCutoff)
Return a list of the largest connected components.
|
static void |
main(java.lang.String[] args)
Program entry point.
|
public ImageBlocker(java.lang.String fileName) throws java.io.IOException
fileName
- TGA image filename (RGB, uncompressed) containing rigid image
elements on a white background.java.io.IOException
- if the Image file cannot be loadedpublic java.util.ArrayList<Block> getBlocks()
public java.util.ArrayList<java.util.HashSet<Block>> getLargeConnectedComponents(double sizeCutoff)
sizeCutoff
- A fraction on [0,1] specifying the cutoff block count for the
components in terms of the largest component size.public static void main(java.lang.String[] args)
args
- Program arguments