Class AdapThresh

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

public class AdapThresh
extends java.lang.Thread

AdapThresh is an algorithm to apply adaptive thresholding to an image.

Author:
Timothy Sharman
See Also:
code.iface.adapthresh

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AdapThresh()
           
 
Method Summary
 int[] mean_thresh(int[] src, int width, int height, int size, int con)
          Applies the adaptive thresholding operator to the specified image array using the mean function to find the threshold value
 int[] meanMaxMin_thresh(int[] src, int width, int height, int size, int con)
          Applies the adaptive thresholding operator to the specified image array using the mean of max & min function to find the threshold value
 int[] median_thresh(int[] src, int width, int height, int size, int con)
          Applies the adaptive thresholding operator to the specified image array using the median function to find the threshold value
 
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

AdapThresh

public AdapThresh()
Method Detail

mean_thresh

public int[] mean_thresh(int[] src,
                         int width,
                         int height,
                         int size,
                         int con)
Applies the adaptive thresholding operator to the specified image array using the mean function to find the threshold value
Parameters:
src - pixel array representing image to be thresholded
width - width of the image in pixels
height - height of the image in pixels
size - the size of the neigbourhood used in finding the threshold
con - the constant value subtracted from the mean
Returns:
a thresholded pixel array of the input image array

median_thresh

public int[] median_thresh(int[] src,
                           int width,
                           int height,
                           int size,
                           int con)
Applies the adaptive thresholding operator to the specified image array using the median function to find the threshold value
Parameters:
src - pixel array representing image to be thresholded
width - width of the image in pixels
height - height of the image in pixels
size - the size of the neigbourhood used in finding the threshold
con - the constant value subtracted from the median
Returns:
a thresholded pixel array of the input image array

meanMaxMin_thresh

public int[] meanMaxMin_thresh(int[] src,
                               int width,
                               int height,
                               int size,
                               int con)
Applies the adaptive thresholding operator to the specified image array using the mean of max & min function to find the threshold value
Parameters:
src - pixel array representing image to be thresholded
width - width of the image in pixels
height - height of the image in pixels
size - the size of the neigbourhood used in finding the threshold
con - the constant value subtracted from the mean
Returns:
a thresholded pixel array of the input image array