at.ac.sbg.cosy.soccerbot.recognition
Class LabColor

java.lang.Object
  extended by at.ac.sbg.cosy.soccerbot.recognition.LabColor

public class LabColor
extends java.lang.Object

Library for Lab Color conversion / information extraction

Author:
Peter Wild

Constructor Summary
LabColor()
           
 
Method Summary
static int distance(double[] lab1, double[] lab2)
          Returns the distance of two Lab values
static double get_a(double[] color)
          Extracts the a channel value out of an argb int value
static double get_b(double[] color)
          Extracts the b channel value out of an argb int value
static double get_L(double[] color)
          Extracts the L channel value out of an argb int value
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabColor

public LabColor()
Method Detail

get_L

public static double get_L(double[] color)
Extracts the L channel value out of an argb int value

Parameters:
color - lab-color value in 3x64-bit lab format (0xLLLLLLLLLLLLLLLLAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBB)
Returns:
L channel value

get_a

public static double get_a(double[] color)
Extracts the a channel value out of an argb int value

Parameters:
color - lab-color value in 3x64-bit lab format (0xLLLLLLLLLLLLLLLLAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBB)
Returns:
a channel value

get_b

public static double get_b(double[] color)
Extracts the b channel value out of an argb int value

Parameters:
color - lab-color value in 3x64-bit lab format (0xLLLLLLLLLLLLLLLLAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBB)
Returns:
b channel value

distance

public static int distance(double[] lab1,
                           double[] lab2)
Returns the distance of two Lab values

Parameters:
lab1 - first lab color operand
lab2 - second lab color operand
Returns:
distance in CIE Lab color space