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

## org.encog.util.downsample
Class RGBDownsample

    java.lang.Object
      org.encog.util.downsample.RGBDownsample

All Implemented Interfaces:
  Downsample

Direct Known Subclasses:
  SimpleIntensityDownsample

    public class RGBDownsample

extends Object
implements Downsample

Downsample an image keeping the RGB colors.

Constructor Summary
`RGBDownsample()`

Method Summary
`double[]` | `downSample(Image image, int height, int width)` Called to downsample the image and store it in the down sample component.
`void` | `downSampleRegion(int x, int y)` Called to downsample a region of the image.
`void` | `findBounds()` This method is called to automatically crop the image so that whitespace is removed.
`int` | `getCurrentBlue()`
`int` | `getCurrentGreen()`
`int` | `getCurrentRed()`
`int` | `getDownSampleBottom()`
`int` | `getDownSampleLeft()`
`int` | `getDownSampleRight()`
`int` | `getDownSampleTop()`
`int` | `getImageHeight()`
`int` | `getImageWidth()`
`int[]` | `getPixelMap()`
`double` | `getRatioX()`
`double` | `getRatioY()`
`void` | `processImage(Image image)` Process the image and prepare it to be downsampled.
`void` | `setCurrentBlue(int currentBlue)` Set the current blue average.
`void` | `setCurrentGreen(int currentGreen)` Set the current green average.
`void` | `setCurrentRed(int currentRed)` Set the current red average.
`void` | `setPixelMap(int[] pixelMap)` Set the pixel map.

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

Constructor Detail

### RGBDownsample

    public RGBDownsample()

Method Detail

### downSample

    public double[] downSample(Image image,
                               int height,
                               int width)

  Called to downsample the image and store it in the down sample component.

  Specified by:
    `downSample` in interface `Downsample`
  Parameters:
    `image` - The image to downsample.
    `height` - The height to downsample to.
    `width` - THe width to downsample to.
  Returns:
    The downsampled image.

### downSampleRegion

    public void downSampleRegion(int x,
                                 int y)

  Called to downsample a region of the image.

  Parameters:
    `x` - The x coordinate of the resulting downsample.
    `y` - The y coordinate of the resulting downsample.

### findBounds

    public void findBounds()

  This method is called to automatically crop the image so that whitespace is removed.

  Specified by:
    `findBounds` in interface `Downsample`

### getCurrentBlue

    public int getCurrentBlue()

### getCurrentGreen

    public int getCurrentGreen()

### getCurrentRed

    public int getCurrentRed()

### getDownSampleBottom

    public int getDownSampleBottom()

  Specified by:
    `getDownSampleBottom` in interface `Downsample`
  Returns:
    the downSampleBottom

### getDownSampleLeft

    public int getDownSampleLeft()

  Specified by:
    `getDownSampleLeft` in interface `Downsample`
  Returns:
    the downSampleLeft

### getDownSampleRight

    public int getDownSampleRight()

  Specified by:
    `getDownSampleRight` in interface `Downsample`
  Returns:
    the downSampleRight

### getDownSampleTop

    public int getDownSampleTop()

  Specified by:
    `getDownSampleTop` in interface `Downsample`
  Returns:
    the downSampleTop

### getImageHeight

    public int getImageHeight()

  Specified by:
    `getImageHeight` in interface `Downsample`
  Returns:
    the imageHeight

### getImageWidth

    public int getImageWidth()

  Specified by:
    `getImageWidth` in interface `Downsample`
  Returns:
    the imageWidth

### getPixelMap

    public int[] getPixelMap()

  Specified by:
    `getPixelMap` in interface `Downsample`
  Returns:
    the pixelMap

### getRatioX

    public double getRatioX()

  Specified by:
    `getRatioX` in interface `Downsample`
  Returns:
    the ratioX

### getRatioY

    public double getRatioY()

  Specified by:
    `getRatioY` in interface `Downsample`
  Returns:
    the ratioY

### processImage

    public void processImage(Image image)

  Process the image and prepare it to be downsampled.

  Specified by:
    `processImage` in interface `Downsample`
  Parameters:
    `image` - The image to downsample.

### setCurrentBlue

    public void setCurrentBlue(int currentBlue)

  Set the current blue average.

  Parameters:
    `currentBlue` - The current blue average.

### setCurrentGreen

    public void setCurrentGreen(int currentGreen)

  Set the current green average.

  Parameters:
    `currentGreen` - The current green average.

### setCurrentRed

    public void setCurrentRed(int currentRed)

  Set the current red average.

  Parameters:
    `currentRed` - The current red average.

### setPixelMap

    public void setPixelMap(int[] pixelMap)

  Set the pixel map.

  Parameters:
    `pixelMap` - The pixel map.

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

Copyright © 2014. All Rights Reserved.