Class ImageSum

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

public class ImageSum
extends java.lang.Thread

ImageSum is an algorithm to find the sum of two images

Author:
Judy Robertson, SELLIC OnLine, Timothy Sharman
See Also:
code.iface.imagesum

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ImageSum(int firstwidth, int secondwidth)
          Constructs a new Image Sum
 
Method Summary
 int[] imageaddition(int[] src1_1d, int[] src2_1d, int width, int height, float oset, float scale)
          Applies the image sum operator on the specified image arrays, with the specified offset and scale value
 int[] imageaddition(int[] src1_1d, int width, int height, float oset, float scale, int constant)
          Adds the specified constant value to the specified input image, also using offset and scale values
 int[] imageaddition(int constant, int width, int height, float oset, float scale, int[] src1_1d)
          Adds every pixel in the input image to the specified constant value, also using offset and scale values
 
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

ImageSum

public ImageSum(int firstwidth,
                int secondwidth)
Constructs a new Image Sum
Parameters:
firstwidth - The width of the first input image
secondwidth - The width of the second input image
Method Detail

imageaddition

public int[] imageaddition(int[] src1_1d,
                           int[] src2_1d,
                           int width,
                           int height,
                           float oset,
                           float scale)
Applies the image sum operator on the specified image arrays, with the specified offset and scale value
Parameters:
src1_1d - The first source image as a pixel array
src2_1d - The second source image as a pixel array
width - width of the destination image in pixels
height - height of the destination image in pixels
oset - The offset value
scale - The scale value
Returns:
A pixel array containing the sum of the two input images

imageaddition

public int[] imageaddition(int[] src1_1d,
                           int width,
                           int height,
                           float oset,
                           float scale,
                           int constant)
Adds the specified constant value to the specified input image, also using offset and scale values
Parameters:
src1_1d - The input pixel array
width - width of the destination image in pixels
height - height of the destination image in pixels
oset - The offset value
scale - The scale value
constant - The constant value to be added to every pixel in the input array
Returns:
A pixel array with the constant value added to every pixel in the input array

imageaddition

public int[] imageaddition(int constant,
                           int width,
                           int height,
                           float oset,
                           float scale,
                           int[] src1_1d)
Adds every pixel in the input image to the specified constant value, also using offset and scale values
Parameters:
constant - The constant value to be added to every pixel in the input array
width - width of the destination image in pixels
height - height of the destination image in pixels
oset - The offset value
scale - The scale value
src1_1d - The input pixel array
Returns:
A pixel array with the sum of the constant value and every pixel in the input array