Class Histogram

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

public class Histogram
extends java.lang.Thread

Histogram creates a histogram of a specified image array and returns an grey_scales*hist_height image array to represent the histogram

Author:
Bob Fisher, Tim Sharman, Nathalie Cammas

Field Summary
 int hist_w
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Histogram()
           
 
Method Summary
 int[] histogram(int[] src, int width, int height)
          Creates a 256*256 image array for the histogram of the specified image array
 int[] histogramScale(int[] src, int width, int height, double max)
          Calculates the histogram and scales it.
 double maximum(int[] src, int width, int height)
          Calculates the maximum value in the histogram
 int peak(int[] src, int width, int height)
          Calculates the peak value of the histogram
 
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
 

Field Detail

hist_w

public int hist_w
Constructor Detail

Histogram

public Histogram()
Method Detail

histogram

public int[] histogram(int[] src,
                       int width,
                       int height)
Creates a 256*256 image array for the histogram of the specified image array
Parameters:
src - Image array to be turned into a histogram
width - The width of the input image
height - The height of the input image
Returns:
An image array representing the histogram of the input image

peak

public int peak(int[] src,
                int width,
                int height)
Calculates the peak value of the histogram
Parameters:
the - image
the - width of the image
the - height of the image
Returns:
the peak value in the histogram

maximum

public double maximum(int[] src,
                      int width,
                      int height)
Calculates the maximum value in the histogram
Parameters:
the - image
the - width of the image
the - height of the image
Returns:
the maximum value in the histogram

histogramScale

public int[] histogramScale(int[] src,
                            int width,
                            int height,
                            double max)
Calculates the histogram and scales it.
Parameters:
the - image
the - width of the image
the - height of the image
the - value to set the histogram maximum
Returns:
the int array containing the histogram scaled