Facemorph.haar
Class Colour

java.lang.Object
  extended by Facemorph.haar.Colour

public class Colour
extends java.lang.Object

A double precisiong RGB colour class


Constructor Summary
Colour()
          Creates a default colour (0.0, 0.0, 0.0)
Colour(java.awt.Color col)
          Creates a colour
Colour(double r, double g, double b)
          Creates a colour
Colour(int r, int g, int b)
          Creates a colour
 
Method Summary
 double getBlue()
           
 java.awt.Color getColor()
           
 double getDoubleVal()
          Get the SAT value
 double getGreen()
           
 double getRed()
           
 void setBlue(double b)
          Set the blue
 void setGreen(double g)
          Set the green
 void setRed(double r)
          Set the red
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Colour

public Colour()
Creates a default colour (0.0, 0.0, 0.0)


Colour

public Colour(java.awt.Color col)
Creates a colour

Parameters:
col - A Color object to create the colour from

Colour

public Colour(int r,
              int g,
              int b)
Creates a colour

Parameters:
r - The red component of the colour (between 0 and 255 for normal colours)
g - The green component of the colour (between 0 and 255 for normal colours)
b - The blue component of the colour (between 0 and 255 for normal colours)

Colour

public Colour(double r,
              double g,
              double b)
Creates a colour

Parameters:
r - The red component of the colour (between -0.5 and 0.5 for normal colours)
g - The green component of the colour (between -0.5 and 0.5 for normal colours)
b - The blue component of the colour (between -0.5 and 0.5 for normal colours)
Method Detail

getColor

public java.awt.Color getColor()
Returns:
The Color representation of the colour

getRed

public double getRed()
Returns:
The red component of the colour

getGreen

public double getGreen()
Returns:
The green component of the colour

getBlue

public double getBlue()
Returns:
The blue component of the colour

setRed

public void setRed(double r)
Set the red

Parameters:
r - the red component of the colour

setGreen

public void setGreen(double g)
Set the green

Parameters:
g - set the green component of the colour

setBlue

public void setBlue(double b)
Set the blue

Parameters:
b - the blue component of the colour

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getDoubleVal

public double getDoubleVal()
Get the SAT value

Returns:
The value of the summed area table as a (YUV) intensity