Class ImageLabel

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--ImageLabel

public class ImageLabel
extends java.lang.Thread

ImageLabel is an algorithm that applies Connected Component Labeling alogrithm to an input image. Only mono images are catered for.

See Also:
code.iface.imagelabel

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ImageLabel(int firstwidth)
          Constructs a new Image Operator
 
Method Summary
 int[] doLabel(int[] src1_1d, int width, int height)
          doLabel applies the Labeling alogrithm plus offset and scaling The input image is expected to be 8-bit mono 0=black everything else=white
 int getColours()
          getColours
 int getNumberOfLabels()
          Returns the number of labels.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageLabel

public ImageLabel(int firstwidth)
Constructs a new Image Operator
Parameters:
firstwidth - The width of the input image
Method Detail

doLabel

public int[] doLabel(int[] src1_1d,
                     int width,
                     int height)
doLabel applies the Labeling alogrithm plus offset and scaling The input image is expected to be 8-bit mono 0=black everything else=white
Parameters:
src1_1d - The input pixel array
width - width of the destination image in pixels
height - height of the destination image in pixels
Returns:
A pixel array containing the labelled image

getColours

public int getColours()
getColours
Returns:
the number of unique, non zero colours. -1 if not valid

getNumberOfLabels

public int getNumberOfLabels()
Returns the number of labels.