public class ImageMLDataextends BasicMLDataAn 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.
- See Also:
- Serialized Form
Constructors Constructor and Description
ImageMLData(Image theImage)Construct an object based on an image.
Methods Modifier and Type Method and Description
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.
Methods inherited from class org.encog.ml.data.basic.BasicMLData
add, clear, clone, createCentroid, getData, getData, minus, plus, setData, setData, size, times, toString
public ImageMLData(Image theImage)Construct an object based on an image.
theImage- The image to use.
public final 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.
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.
public final Image getImage()
- the image
public final void setImage(Image theImage)
theImage- the image to set
SCaVis 1.8 © jWork.org