org.encog.neural.data.image
Class ImageNeuralData

java.lang.Object
  extended by org.encog.neural.data.basic.BasicNeuralData
      extended by org.encog.neural.data.image.ImageNeuralData
All Implemented Interfaces:
Serializable, Cloneable, NeuralData

public class ImageNeuralData
extends BasicNeuralData

An extension of the BasicNeuralData class that is designed to hold images for input into a neural network. This class should only be used with the ImageNeuralDataSet collection. This class provides the ability to associate images with the elements of a dataset. These images will be downsampled to the resolution specified in the ImageNeuralData set class that they are added to.

Author:
jheaton
See Also:
Serialized Form

Constructor Summary
ImageNeuralData(Image image)
          Construct an object based on an image.
 
Method Summary
 void downsample(Downsample downsampler, boolean findBounds, int height, int width, double hi, double lo)
          Downsample, and copy, the image contents into the data of this object.
 Image getImage()
           
 void setImage(Image image)
           
 String toString()
          
 
Methods inherited from class org.encog.neural.data.basic.BasicNeuralData
add, clear, clone, getData, getData, setData, setData, size
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageNeuralData

public ImageNeuralData(Image image)
Construct an object based on an image.

Parameters:
image - The image to use.
Method Detail

downsample

public void downsample(Downsample downsampler,
                       boolean findBounds,
                       int height,
                       int width,
                       double hi,
                       double lo)
Downsample, and copy, the image contents into the data of this object. Calling this method has no effect on the image, as the same image can be downsampled multiple times to different resolutions.

Parameters:
downsampler - The downsampler object to use.
findBounds - Should the bounds be located and cropped.
height - The height to downsample to.
width - The width to downsample to.
hi - The high value to normalize to.
lo - The low value to normalize to.

getImage

public Image getImage()
Returns:
the image

setImage

public void setImage(Image image)
Parameters:
image - the image to set

toString

public String toString()

Overrides:
toString in class BasicNeuralData


Copyright © 2011. All Rights Reserved.