JIGL
v1.6

jigl.image.utils
Class ConnectedComponents

java.lang.Object
  |
  +--jigl.image.utils.ConnectedComponents

public class ConnectedComponents
extends Object

Creates the connected regions of a BinaryImage. This class is the same as jigl.image.ops.ConnectedComponent except that it is not a subclass of SimpleOperator.


Field Summary
private  int background
           
private  int EIGHT_CONNECTED
          Creates Connected Image from neighbors UP, DOWN, LEFT, and RIGHT
private  int FOUR_CONNECTED
           
private  int neighbors
          Creates Connected Image from all it's neighbors
 
Constructor Summary
ConnectedComponents(int numberNeighbors, int backgroundColor)
          Connected component constructor
 
Method Summary
 GrayImage apply(BinaryImage image)
          Returns the GrayImage made up of Connected Regions the background color is set to zero, and the region values start at 1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FOUR_CONNECTED

private final int FOUR_CONNECTED
See Also:
Constant Field Values

EIGHT_CONNECTED

private final int EIGHT_CONNECTED
Creates Connected Image from neighbors UP, DOWN, LEFT, and RIGHT

See Also:
Constant Field Values

neighbors

private int neighbors
Creates Connected Image from all it's neighbors


background

private int background
Constructor Detail

ConnectedComponents

public ConnectedComponents(int numberNeighbors,
                           int backgroundColor)
                    throws InvalidArgumentException
Connected component constructor

Parameters:
numberNeighbors - either FOUR_CONNECTED, or EIGHT_CONNECTED
backgroundColor - either 0 or 1
Method Detail

apply

public GrayImage apply(BinaryImage image)
Returns the GrayImage made up of Connected Regions the background color is set to zero, and the region values start at 1


JIGL
v1.6

Submit a bug or feature
Revised in May 2002 by Weiming Liu