public enum ColourSpace extends Enum<ColourSpace>
Enum Constant and Description |
---|
CIE_Lab
CIE_Lab color space, using the same transform as in OpenCV, which in turn
came from:
http://www.cica.indiana.edu/cica/faq/color_spaces/color.spaces.html
|
CIE_Lab_Norm
Normalised CIE_Lab color space, using the same transform as in OpenCV,
which in turn came from:
http://www.cica.indiana.edu/cica/faq/color_spaces/color.spaces.html
|
CIE_Luv
CIE L*u*v* color space (CIE 1976).
|
CIE_XYZ
CIE_XYZ color space, using the same transform as in OpenCV, which in turn
came from:
http://www.cica.indiana.edu/cica/faq/color_spaces/color.spaces.html
|
CUSTOM
A custom (unknown) colour space
|
H1H2
H1H2 colour space (two component hue)
|
H1H2_2
H1H2_2 colour space (two component hue)
|
H2S
H2S colour space
|
H2S_2
H2S_2 colour space
|
H2SV
H2SV colour space
|
H2SV_2
H2SV_2 colour space
|
HS
HS colour space
|
HS_2
HS_2 colour space
|
HSI
HSI colour space
|
HSL
HSL colour space
|
HSV
HSV colour space
|
HSY
HSY colour space
|
HUE
Hue colour space
|
LUMINANCE_AVG
LUMINANCE colour space from averaging RGB
|
LUMINANCE_NTSC
LUMINANCE colour space using NTSC perceptual weightings
|
MODIFIED_OPPONENT
Modified Opponent colour-space as used in
vlfeat . |
OPPONENT
Basic opponent colour-space.
|
RGB
RGB colour space
|
RGB_INTENSITY_NORMALISED
Intensity normalised RGB colour space using normalisation
|
RGBA
RGB with alpha colour space
|
SATURATION
Saturation colour space
|
YUV
YUV
|
YUV_Norm
Normalised YUV.
|
Modifier and Type | Method and Description |
---|---|
abstract float |
computeIntensity(float[] colour)
Compute the intensity of the given pixel in this colourspace.
|
MBFImage |
convert(MBFImage input)
Convert the image to this colour space
|
static MBFImage |
convert(MBFImage image,
ColourSpace cs)
Convert the image to the given colour space
|
Float[] |
convertFromRGB(Float[] input)
Convert the given RGB image to the current colour space
|
abstract MBFImage |
convertFromRGB(MBFImage input)
Convert the given RGB image to the current colour space
|
Float[] |
convertToRGB(Float[] input)
Convert the given RGB image to the current colour space
|
abstract MBFImage |
convertToRGB(MBFImage input)
Convert the image in this color space to RGB
|
abstract int |
getNumBands()
Get the number of bands required by this colour space
|
Float[] |
sanitise(Float[] colour)
Sanitise the given colour array to fit the colour space format.
|
static ColourSpace |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ColourSpace[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ColourSpace RGB
public static final ColourSpace HSV
public static final ColourSpace HSI
public static final ColourSpace H2SV
public static final ColourSpace H2SV_2
public static final ColourSpace H2S
public static final ColourSpace H2S_2
public static final ColourSpace LUMINANCE_AVG
public static final ColourSpace LUMINANCE_NTSC
public static final ColourSpace HUE
public static final ColourSpace SATURATION
public static final ColourSpace RGB_INTENSITY_NORMALISED
public static final ColourSpace CUSTOM
public static final ColourSpace RGBA
public static final ColourSpace HSL
public static final ColourSpace HSY
public static final ColourSpace HS
public static final ColourSpace HS_2
public static final ColourSpace H1H2
public static final ColourSpace H1H2_2
public static final ColourSpace CIE_XYZ
public static final ColourSpace CIE_Lab
The resultant L values are in the range 0-100, and the a & b values are in -127..127 inclusive.
public static final ColourSpace CIE_Lab_Norm
The L, & b values are normalised to 0..1.
public static final ColourSpace CIE_Luv
The resultant L values are in the range 0-100, and the u & v values are in -100..100 inclusive.
public static final ColourSpace YUV
The resultant Y is in the range [0, 1]; U is [-0.436, 0.436] and V is [-0.615, 0.615].
public static final ColourSpace YUV_Norm
Each of the Y, U and V values are in [0, 1].
public static final ColourSpace MODIFIED_OPPONENT
vlfeat
. Intensity
is computed using the NTSC conversion. The intensity is also is added
back to the other two components with a small multiplier for
monochromatic regions.
The channel order is Intensity, O1 (r-g), O2 (r + g - 2b).
public static final ColourSpace OPPONENT
The channel order is Intensity, O1 (r-g), O2 (r + g - 2b).
public static ColourSpace[] values()
for (ColourSpace c : ColourSpace.values()) System.out.println(c);
public static ColourSpace valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract MBFImage convertFromRGB(MBFImage input)
input
- RGB imagepublic Float[] convertFromRGB(Float[] input)
input
- RGB imagepublic Float[] convertToRGB(Float[] input)
input
- RGB imagepublic abstract MBFImage convertToRGB(MBFImage input)
input
- image in this colour spacepublic MBFImage convert(MBFImage input)
input
- an imagepublic static MBFImage convert(MBFImage image, ColourSpace cs)
image
- the imagecs
- the target colour spacepublic abstract int getNumBands()
public abstract float computeIntensity(float[] colour)
colour
- the colour to extract the intensity frompublic Float[] sanitise(Float[] colour)
colour
- The colour to sanitise