FeatureExtractor.Utils
Class HSV

java.lang.Object
  extended by FeatureExtractor.Utils.HSV

public class HSV
extends java.lang.Object

Class implementing conversions between HSV & RGB


Constructor Summary
HSV()
           
 
Method Summary
static double[] HSV2RGB(double h, double s, double v)
          Converts HSV values to RGB values.
static double[] RGB2HSV(double r, double g, double b)
          Converts RGB values to HSV values.
static HSVImage toHSV(javax.media.jai.PlanarImage image)
          Creates the HSV matrix from a given image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HSV

public HSV()
Method Detail

toHSV

public static HSVImage toHSV(javax.media.jai.PlanarImage image)
Creates the HSV matrix from a given image.

Parameters:
image - Image to be converted.
Returns:
An HSVImage containing the three HSV matrices.

RGB2HSV

public static double[] RGB2HSV(double r,
                               double g,
                               double b)
Converts RGB values to HSV values.

Parameters:
r - R(ed) component.
g - G(reen) component.
b - B(lue) component.
Returns:
Array of HSV values.

HSV2RGB

public static double[] HSV2RGB(double h,
                               double s,
                               double v)
Converts HSV values to RGB values.

Parameters:
h - H(ue) value.
s - S(aturation) value.
v - V(alue) (intensity) value.
Returns:
Array of RGB values.