Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.wpi.first.wpilibj.image
Class ColorImage

    java.lang.Object
      edu.wpi.first.wpilibj.image.Image
          edu.wpi.first.wpilibj.image.ColorImage

Direct Known Subclasses:
  HSLImage, RGBImage

    public abstract class ColorImage

extends Image

A class representing a color image.

Author:
  dtjones

Field Summary

Fields inherited from class edu.wpi.first.wpilibj.image.Image
`image`

Method Summary
`ColorImage` | `colorEqualize()` Calculates the histogram of each plane of a color image and redistributes pixel values across the desired range while maintaining pixel value groupings.
`MonoImage` | `getBluePlane()` Get the blue color plane from the image when represented in RGB color space.
`MonoImage` | `getGreenPlane()` Get the green color plane from the image when represented in RGB color space.
`MonoImage` | `getHSIHuePlane()` Get the hue color plane from the image when represented in HSI color space.
`MonoImage` | `getHSISaturationPlane()` Get the saturation color plane from the image when represented in HSI color space.
`MonoImage` | `getHSLHuePlane()` Get the hue color plane from the image when represented in HSL color space.
`MonoImage` | `getHSLSaturationPlane()` Get the saturation color plane from the image when represented in HSL color space.
`MonoImage` | `getHSVHuePlane()` Get the hue color plane from the image when represented in HSV color space.
`MonoImage` | `getHSVSaturationPlane()` Get the saturation color plane from the image when represented in HSV color space.
`MonoImage` | `getIntensityPlane()` Get the intensity color plane from the image when represented in HSI color space.
`MonoImage` | `getLuminancePlane()` Get the luminance color plane from the image when represented in HSL color space.
`MonoImage` | `getRedPlane()` Get the red color plane from the image when represented in RGB color space.
`MonoImage` | `getValuePlane()` Get the value color plane from the image when represented in HSV color space.
`ColorImage` | `luminanceEqualize()` Calculates the histogram of each plane of a color image and redistributes pixel values across the desired range while maintaining pixel value groupings for the Luminance plane only.
`ColorImage` | `replaceBluePlane(MonoImage plane)` Set the blue color plane from the image when represented in RGB color space.
`ColorImage` | `replaceGreenPlane(MonoImage plane)` Set the green color plane from the image when represented in RGB color space.
`ColorImage` | `replaceHSIHuePlane(MonoImage plane)` Set the hue color plane from the image when represented in HSI color space.
`ColorImage` | `replaceHSISaturationPlane(MonoImage plane)` Set the saturation color plane from the image when represented in HSI color space.
`ColorImage` | `replaceHSLHuePlane(MonoImage plane)` Set the hue color plane from the image when represented in HSL color space.
`ColorImage` | `replaceHSLSaturationPlane(MonoImage plane)` Set the saturation color plane from the image when represented in HSL color space.
`ColorImage` | `replaceHSVHuePlane(MonoImage plane)` Set the hue color plane from the image when represented in HSV color space.
`ColorImage` | `replaceHSVSaturationPlane(MonoImage plane)` Set the saturation color plane from the image when represented in HSV color space.
`ColorImage` | `replaceIntensityPlane(MonoImage plane)` Set the intensity color plane from the image when represented in HSI color space.
`ColorImage` | `replaceLuminancePlane(MonoImage plane)` Set the luminance color plane from the image when represented in HSL color space.
`ColorImage` | `replaceRedPlane(MonoImage plane)` Set the red color plane from the image when represented in RGB color space.
`ColorImage` | `replaceValuePlane(MonoImage plane)` Set the value color plane from the image when represented in HSV color space.
`BinaryImage` | `thresholdHSI(int hueLow, int hueHigh, int saturationLow, int saturationHigh, int intansityLow, int intensityHigh)` Return a mask of the areas of the image that fall within the given ranges for color values
`BinaryImage` | `thresholdHSL(int hueLow, int hueHigh, int saturationLow, int saturationHigh, int luminenceLow, int luminenceHigh)` Return a mask of the areas of the image that fall within the given ranges for color values
`BinaryImage` | `thresholdHSV(int hueLow, int hueHigh, int saturationLow, int saturationHigh, int valueLow, int valueHigh)` Return a mask of the areas of the image that fall within the given ranges for color values
`BinaryImage` | `thresholdRGB(int redLow, int redHigh, int greenLow, int greenHigh, int blueLow, int blueHigh)` Return a mask of the areas of the image that fall within the given ranges for color values

Methods inherited from class edu.wpi.first.wpilibj.image.Image
`free, getHeight, getWidth, write`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### thresholdRGB

    public BinaryImage thresholdRGB(int redLow,
                                    int redHigh,
                                    int greenLow,
                                    int greenHigh,
                                    int blueLow,
                                    int blueHigh)
                             throws NIVisionException

  Return a mask of the areas of the image that fall within the given ranges for color values

  Parameters:
    `redLow` - The lower red limit.
    `redHigh` - The upper red limit.
    `greenLow` - The lower green limit.
    `greenHigh` - The upper green limit.
    `blueLow` - The lower blue limit.
    `blueHigh` - The upper blue limit.
  Returns:
    A BinaryImage masking the areas which match the given thresholds.
  Throws:
    `NIVisionException`

### thresholdHSL

    public BinaryImage thresholdHSL(int hueLow,
                                    int hueHigh,
                                    int saturationLow,
                                    int saturationHigh,
                                    int luminenceLow,
                                    int luminenceHigh)
                             throws NIVisionException

  Return a mask of the areas of the image that fall within the given ranges for color values

  Parameters:
    `hueLow` - The lower hue limit.
    `hueHigh` - The upper hue limit.
    `saturationLow` - The lower saturation limit.
    `saturationHigh` - The upper saturation limit.
    `luminenceLow` - The lower luminence limit.
    `luminenceHigh` - The upper luminence limit.
  Returns:
    A BinaryImage masking the areas which match the given thresholds.
  Throws:
    `NIVisionException`

### thresholdHSV

    public BinaryImage thresholdHSV(int hueLow,
                                    int hueHigh,
                                    int saturationLow,
                                    int saturationHigh,
                                    int valueLow,
                                    int valueHigh)
                             throws NIVisionException

  Return a mask of the areas of the image that fall within the given ranges for color values

  Parameters:
    `hueLow` - The lower hue limit.
    `hueHigh` - The upper hue limit.
    `saturationLow` - The lower saturation limit.
    `saturationHigh` - The upper saturation limit.
    `valueHigh` - The lower value limit.
    `valueLow` - The upper value limit.
  Returns:
    A BinaryImage masking the areas which match the given thresholds.
  Throws:
    `NIVisionException`

### thresholdHSI

    public BinaryImage thresholdHSI(int hueLow,
                                    int hueHigh,
                                    int saturationLow,
                                    int saturationHigh,
                                    int intansityLow,
                                    int intensityHigh)
                             throws NIVisionException

  Return a mask of the areas of the image that fall within the given ranges for color values

  Parameters:
    `hueLow` - The lower hue limit.
    `hueHigh` - The upper hue limit.
    `saturationLow` - The lower saturation limit.
    `saturationHigh` - The upper saturation limit.
    `intansityLow` - The lower intensity limit.
    `intensityHigh` - The upper intensity limit.
  Returns:
    A BinaryImage masking the areas which match the given thresholds.
  Throws:
    `NIVisionException`

### getRedPlane

    public MonoImage getRedPlane()
                          throws NIVisionException

  Get the red color plane from the image when represented in RGB color space.

  Returns:
    The red color plane from the image.
  Throws:
    `NIVisionException`

### getGreenPlane

    public MonoImage getGreenPlane()
                            throws NIVisionException

  Get the green color plane from the image when represented in RGB color space.

  Returns:
    The green color plane from the image.
  Throws:
    `NIVisionException`

### getBluePlane

    public MonoImage getBluePlane()
                           throws NIVisionException

  Get the blue color plane from the image when represented in RGB color space.

  Returns:
    The blue color plane from the image.
  Throws:
    `NIVisionException`

### getHSLHuePlane

    public MonoImage getHSLHuePlane()
                             throws NIVisionException

  Get the hue color plane from the image when represented in HSL color space.

  Returns:
    The hue color plane from the image.
  Throws:
    `NIVisionException`

### getHSVHuePlane

    public MonoImage getHSVHuePlane()
                             throws NIVisionException

  Get the hue color plane from the image when represented in HSV color space.

  Returns:
    The hue color plane from the image.
  Throws:
    `NIVisionException`

### getHSIHuePlane

    public MonoImage getHSIHuePlane()
                             throws NIVisionException

  Get the hue color plane from the image when represented in HSI color space.

  Returns:
    The hue color plane from the image.
  Throws:
    `NIVisionException`

### getHSLSaturationPlane

    public MonoImage getHSLSaturationPlane()
                                    throws NIVisionException

  Get the saturation color plane from the image when represented in HSL color space.

  Returns:
    The saturation color plane from the image.
  Throws:
    `NIVisionException`

### getHSVSaturationPlane

    public MonoImage getHSVSaturationPlane()
                                    throws NIVisionException

  Get the saturation color plane from the image when represented in HSV color space.

  Returns:
    The saturation color plane from the image.
  Throws:
    `NIVisionException`

### getHSISaturationPlane

    public MonoImage getHSISaturationPlane()
                                    throws NIVisionException

  Get the saturation color plane from the image when represented in HSI color space.

  Returns:
    The saturation color plane from the image.
  Throws:
    `NIVisionException`

### getLuminancePlane

    public MonoImage getLuminancePlane()
                                throws NIVisionException

  Get the luminance color plane from the image when represented in HSL color space.

  Returns:
    The luminance color plane from the image.
  Throws:
    `NIVisionException`

### getValuePlane

    public MonoImage getValuePlane()
                            throws NIVisionException

  Get the value color plane from the image when represented in HSV color space.

  Returns:
    The value color plane from the image.
  Throws:
    `NIVisionException`

### getIntensityPlane

    public MonoImage getIntensityPlane()
                                throws NIVisionException

  Get the intensity color plane from the image when represented in HSI color space.

  Returns:
    The intensity color plane from the image.
  Throws:
    `NIVisionException`

### replaceRedPlane

    public ColorImage replaceRedPlane(MonoImage plane)
                               throws NIVisionException

  Set the red color plane from the image when represented in RGB color space. This does not create a new image, but modifies this one instead. Create a copy before hand if you need to continue using the original.

  Parameters:
    `plane` - The MonoImage representing the new color plane.
  Returns:
    The resulting image.
  Throws:
    `NIVisionException`

### replaceGreenPlane

    public ColorImage replaceGreenPlane(MonoImage plane)
                                 throws NIVisionException

  Set the green color plane from the image when represented in RGB color space. This does not create a new image, but modifies this one instead. Create a copy before hand if you need to continue using the original.

  Parameters:
    `plane` - The MonoImage representing the new color plane.
  Returns:
    The resulting image.
  Throws:
    `NIVisionException`

### replaceBluePlane

    public ColorImage replaceBluePlane(MonoImage plane)
                                throws NIVisionException

  Set the blue color plane from the image when represented in RGB color space. This does not create a new image, but modifies this one instead. Create a copy before hand if you need to continue using the original.

  Parameters:
    `plane` - The MonoImage representing the new color plane.
  Returns:
    The resulting image.
  Throws:
    `NIVisionException`

### replaceHSLHuePlane

    public ColorImage replaceHSLHuePlane(MonoImage plane)
                                  throws NIVisionException

  Set the hue color plane from the image when represented in HSL color space. This does not create a new image, but modifies this one instead. Create a copy before hand if you need to continue using the original.

  Parameters:
    `plane` - The MonoImage representing the new color plane.
  Returns:
    The resulting image.
  Throws:
    `NIVisionException`

### replaceHSVHuePlane

    public ColorImage replaceHSVHuePlane(MonoImage plane)
                                  throws NIVisionException

  Set the hue color plane from the image when represented in HSV color space. This does not create a new image, but modifies this one instead. Create a copy before hand if you need to continue using the original.

  Parameters:
    `plane` - The MonoImage representing the new color plane.
  Returns:
    The resulting image.
  Throws:
    `NIVisionException`

### replaceHSIHuePlane

    public ColorImage replaceHSIHuePlane(MonoImage plane)
                                  throws NIVisionException

  Set the hue color plane from the image when represented in HSI color space. This does not create a new image, but modifies this one instead. Create a copy before hand if you need to continue using the original.

  Parameters:
    `plane` - The MonoImage representing the new color plane.
  Returns:
    The resulting image.
  Throws:
    `NIVisionException`

### replaceHSLSaturationPlane

    public ColorImage replaceHSLSaturationPlane(MonoImage plane)
                                         throws NIVisionException

  Set the saturation color plane from the image when represented in HSL color space. This does not create a new image, but modifies this one instead. Create a copy before hand if you need to continue using the original.

  Parameters:
    `plane` - The MonoImage representing the new color plane.
  Returns:
    The resulting image.
  Throws:
    `NIVisionException`

### replaceHSVSaturationPlane

    public ColorImage replaceHSVSaturationPlane(MonoImage plane)
                                         throws NIVisionException

  Set the saturation color plane from the image when represented in HSV color space. This does not create a new image, but modifies this one instead. Create a copy before hand if you need to continue using the original.

  Parameters:
    `plane` - The MonoImage representing the new color plane.
  Returns:
    The resulting image.
  Throws:
    `NIVisionException`

### replaceHSISaturationPlane

    public ColorImage replaceHSISaturationPlane(MonoImage plane)
                                         throws NIVisionException

  Set the saturation color plane from the image when represented in HSI color space. This does not create a new image, but modifies this one instead. Create a copy before hand if you need to continue using the original.

  Parameters:
    `plane` - The MonoImage representing the new color plane.
  Returns:
    The resulting image.
  Throws:
    `NIVisionException`

### replaceLuminancePlane

    public ColorImage replaceLuminancePlane(MonoImage plane)
                                     throws NIVisionException

  Set the luminance color plane from the image when represented in HSL color space. This does not create a new image, but modifies this one instead. Create a copy before hand if you need to continue using the original.

  Parameters:
    `plane` - The MonoImage representing the new color plane.
  Returns:
    The resulting image.
  Throws:
    `NIVisionException`

### replaceValuePlane

    public ColorImage replaceValuePlane(MonoImage plane)
                                 throws NIVisionException

  Set the value color plane from the image when represented in HSV color space. This does not create a new image, but modifies this one instead. Create a copy before hand if you need to continue using the original.

  Parameters:
    `plane` - The MonoImage representing the new color plane.
  Returns:
    The resulting image.
  Throws:
    `NIVisionException`

### replaceIntensityPlane

    public ColorImage replaceIntensityPlane(MonoImage plane)
                                     throws NIVisionException

  Set the intensity color plane from the image when represented in HSI color space. This does not create a new image, but modifies this one instead. Create a copy before hand if you need to continue using the original.

  Parameters:
    `plane` - The MonoImage representing the new color plane.
  Returns:
    The resulting image.
  Throws:
    `NIVisionException`

### colorEqualize

    public ColorImage colorEqualize()
                             throws NIVisionException

  Calculates the histogram of each plane of a color image and redistributes pixel values across the desired range while maintaining pixel value groupings. This does not create a new image, but modifies this one instead. Create a copy before hand if you need to continue using the original.

  Returns:
    The modified image.
  Throws:
    `NIVisionException`

### luminanceEqualize

    public ColorImage luminanceEqualize()
                                 throws NIVisionException

  Calculates the histogram of each plane of a color image and redistributes pixel values across the desired range while maintaining pixel value groupings for the Luminance plane only. This does not create a new image, but modifies this one instead. Create a copy before hand if you need to continue using the original.

  Returns:
    The modified image.
  Throws:
    `NIVisionException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"