org.encog.neural.data.image
Class ImageNeuralData
java.lang.Object
org.encog.neural.data.basic.BasicNeuralData
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
ImageNeuralData
public ImageNeuralData(Image image)
- Construct an object based on an image.
- Parameters:
image - The image to use.
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.