|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.ac.sbg.cosy.soccerbot.recognition.RGBColor
public class RGBColor
Library for RGB Color conversion / information extraction
Constructor Summary | |
---|---|
RGBColor()
|
Method Summary | |
---|---|
static int |
get_B(int color)
Extracts the blue channel value out of an rgb int value |
static int |
get_G(int color)
Extracts the green channel value out of an rgb int value |
static int |
get_R(int color)
Extracts the red channel value out of an rgb int value |
static int |
rgb(int r,
int g,
int b)
Creates an argb format representation of four alpha, red, green, blue channel values within 0x00 - 0xFF. |
static int |
rgb2hsv(int rgb)
Converts rgb values into hsv values (lossy transformation) usually hsv values are displayed as h = [0,360], s = [0,100], v = [0,100], so simply transform the used space h = [0,65535], s= [0,255], v= [0,255] to your needs. |
static void |
rgb2lab(int rgb,
double[] lab)
Converts rgb values into lab values (lossy transformation) usually lab values are displayed as L = [0,100], a = [0,100], b = [0,100], so simply transform the used space L = [0,255], a= [0,255], b= [0,255] to your needs. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RGBColor()
Method Detail |
---|
public static int get_R(int color)
color
- int-color value in 32-bit rgb format (0x00RRGGBB)
public static int get_G(int color)
color
- int-color value in 32-bit rgb format (0x00RRGGBB)
public static int get_B(int color)
color
- int-color value in 32-bit rgb format (0x00RRGGBB)
public static int rgb(int r, int g, int b)
r
- red color value in 0x00 - 0xFFg
- green color value in 0x00 - 0xFFb
- blue color value in 0x00 - 0xFF
public static int rgb2hsv(int rgb)
rgb
- argb 32-bit format (0xAARRGGBB) representation
public static void rgb2lab(int rgb, double[] lab)
rgb
- argb 32-bit format (0xAARRGGBB) representationlab
- initialized array of length 3 containing lab representation of according rgb after call
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |