JMU
logoPerspecTV.png
ImageManpiulator


Background
Class Attributes:
TOLERANCE: This class must have a double "constant" named TOLERANCE that has a value of 55.0.
Class Methods:
The areSimilar() Method: This class must have a method with the following signature:
    /**
     * Determine if two Color objects are similar to each other
     *
     * @param a   One Color
     * @param b   The other Color
     * @return    true if a and b are similar; false otherwise
     */
    public static boolean areSimilar(Color a, Color b)
  

This method must compute the Euclidean distance between a and b and compare it to TOLERANCE. It must return true if the distance is less than TOLERANCE and false otherwise.

This method must use the int red, green, and blue components as the three dimensions in the Euclidean distance. These value can be obtained using the getRed(), getGreen(), and getBlue() methods in the Color class.

The copyImage() Method: This class must have a method with the following signature:
    /**
     * Make a deep copy of an image
     *
     * @param image     The original image
     * @return          The (deep) copy of the image
     */
    public static Color[][] copyImage(Color[][] image)
  

Copyright 2011