Class Boundary

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

public class Boundary
extends java.lang.Thread

Boundary is an algorithm used to track the edge of a binary image.

Author:
Bob Fisher, Nathalie Cammas

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Boundary()
          Default no argument constructor.
 
Method Summary
 BinaryFast apply_boundary(BinaryFast input, int width, int height)
          Applies the algorithm: scans a pixel if it is a boundary pixel and marks it as scanned with 128.
 void clear_interior(int x, int y)
          resets all pixels with value 255 adjacent to current pixel to 64 (interior point) or 192 (interior boundary)
 void single_track(int x, int y)
          Scans a boundary pixel and the others adjacent to it until it comes back to the starting point
 boolean starting_point(int x, int y)
           
 
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

Boundary

public Boundary()
Default no argument constructor.
Method Detail

single_track

public void single_track(int x,
                         int y)
Scans a boundary pixel and the others adjacent to it until it comes back to the starting point
Parameters:
x,y - position of the starting point

clear_interior

public void clear_interior(int x,
                           int y)
resets all pixels with value 255 adjacent to current pixel to 64 (interior point) or 192 (interior boundary)
Parameters:
position - of the current pixel

starting_point

public boolean starting_point(int x,
                              int y)
Parameters:
position - of the current pixel
Returns:
if the pixel is a starting point of a boundary

apply_boundary

public BinaryFast apply_boundary(BinaryFast input,
                                 int width,
                                 int height)
Applies the algorithm: scans a pixel if it is a boundary pixel and marks it as scanned with 128.
Parameters:
input - the input binary image
width - of the input image
height - of the input image
Returns:
a binary image