org.encog.platformspecific.j2se.data.image
Class ImageMLDataSet
java.lang.Object
org.encog.ml.data.basic.BasicMLDataSet
org.encog.platformspecific.j2se.data.image.ImageMLDataSet
- All Implemented Interfaces:
- Serializable, Iterable<MLDataPair>, MLDataSet
public class ImageMLDataSet
- extends BasicMLDataSet
Store a collection of images for training with a neural network. This class
collects and then downsamples images for use with a neural network. This is a
memory based class, so large datasets can run out of memory.
- Author:
- jheaton
- See Also:
- Serialized Form
Field Summary |
static String |
MUST_USE_IMAGE
Error message to inform the caller that only ImageNeuralData objects can
be used with this collection. |
Constructor Summary |
ImageMLDataSet(Downsample theDownsampler,
boolean theFindBounds,
double theHi,
double theLo)
Construct this class with the specified downsampler. |
Method Summary |
void |
downsample(int theHeight,
int theWidth)
Downsample all images and generate training data. |
int |
getHeight()
|
int |
getWidth()
|
Methods inherited from class org.encog.ml.data.basic.BasicMLDataSet |
add, add, add, clone, close, get, getData, getIdealSize, getInputSize, getRecord, getRecordCount, isSupervised, iterator, openAdditional, setData, size, toList |
MUST_USE_IMAGE
public static final String MUST_USE_IMAGE
- Error message to inform the caller that only ImageNeuralData objects can
be used with this collection.
- See Also:
- Constant Field Values
ImageMLDataSet
public ImageMLDataSet(Downsample theDownsampler,
boolean theFindBounds,
double theHi,
double theLo)
- Construct this class with the specified downsampler.
- Parameters:
theDownsampler
- The downsampler to use.theFindBounds
- Should the bounds be found and clipped.theHi
- The high value to normalize to.theLo
- The low value to normalize to.
downsample
public final void downsample(int theHeight,
int theWidth)
- Downsample all images and generate training data.
- Parameters:
theHeight
- The height to downsample to.theWidth
- the width to downsample to.
getHeight
public final int getHeight()
- Returns:
- the height
getWidth
public final int getWidth()
- Returns:
- the width
Copyright © 2014. All Rights Reserved.