Class ImageInputSynapse
- java.lang.Object
-
- org.joone.engine.Synapse
-
- org.joone.io.StreamInputSynapse
-
- org.joone.io.ImageInputSynapse
-
- All Implemented Interfaces:
- java.io.Serializable, InputPatternListener, Learnable, LearnableSynapse, NeuralElement, OutputPatternListener, Inspectable, InputSynapse, PlugInListener
public class ImageInputSynapse extends StreamInputSynapse
This synapse collects data from Image files or Image objects and feeds the data from the Images into the Neural network. GIF, JPG and PNG image file formats can be read. The synapse operates in two modes, colour and grey scale.Colour Mode In colour mode ImageInputSynapse produces seperate RGB input values in the range 0 to 1 from the image. So using an image of width 10 and height 10 there will be 10x10x3 inputs in the range 0 to 1. The individual colour components are calculated by obtaining the RGB values from the image. These value are initially in an ARGB format. Transparency is removed and the RGB value extracted and normalised between 0 and 1.
Non Colour Mode / Grey Scale Mode In this mode the synapse treats each input value as a grey scale value for each pixel. In this mode only Width*Height values are required. To produce the final image the Red, Green and Blue components are the set to this same value. The grey scale component is calculated by obtaining the RGB values from the image. These value are initially in an ARGB format. Transparency is removed and the RGB value extracted, averaged and normalised to produce one grey scale value between 0 and 1.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ImageInputSynapse()Creates a new instance of ImageInputSynapse
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.TreeSetcheck()Checks and returns any problems found with the settings of this synapse.booleangetColourMode()intgetDesiredHeight()intgetDesiredWidth()java.lang.StringgetFileFilter()java.io.FilegetImageDirectory()voidsetColourMode(boolean ColourMode)voidsetDesiredHeight(int DesiredHeight)voidsetDesiredWidth(int DesiredWidth)voidsetFileFilter(java.lang.String newFileFilter)voidsetImageDirectory(java.io.File imgDir)voidsetImageInput(java.awt.Image[] theImages)-
Methods inherited from class org.joone.io.StreamInputSynapse
addPlugIn, addPlugInListener, dataChanged, fwdGet, fwdGet, getAdvancedColumnSelector, getAllPlugInListeners, getCurrentRow, getDecimalPoint, getFirstCol, getFirstRow, getInputPatterns, getInputVector, getLastCol, getLastRow, getMaxBufSize, getPlugIn, getStream, gotoFirstLine, gotoLine, InspectableTitle, Inspections, isBuffered, isEOF, isStepCounter, numColumns, readAll, removeAllPlugIns, removePlugInListener, reset, resetInput, revPut, setAdvancedColumnSelector, setBuffered, setDecimalPoint, setFirstCol, setFirstRow, setInputPatterns, setLastCol, setLastRow, setMaxBufSize, setPlugin, setPlugIn, setStepCounter
-
Methods inherited from class org.joone.engine.Synapse
addNoise, canCountSteps, fwdPut, getIgnoreBefore, getInputDimension, getLearner, getLearningRate, getMomentum, getMonitor, getName, getOutputDimension, getWeights, init, initLearner, isEnabled, isInputFull, isLoopBack, isOutputFull, randomize, revGet, setEnabled, setIgnoreBefore, setInputDimension, setInputFull, setLearningRate, setLoopBack, setMomentum, setMonitor, setName, setOutputDimension, setOutputFull, setWeights
-
-
-
-
Constructor Detail
-
ImageInputSynapse
public ImageInputSynapse()
Creates a new instance of ImageInputSynapse
-
-
Method Detail
-
setFileFilter
public void setFileFilter(java.lang.String newFileFilter)
-
getFileFilter
public java.lang.String getFileFilter()
-
setImageInput
public void setImageInput(java.awt.Image[] theImages)
-
getDesiredWidth
public int getDesiredWidth()
-
setDesiredWidth
public void setDesiredWidth(int DesiredWidth)
-
getDesiredHeight
public int getDesiredHeight()
-
setDesiredHeight
public void setDesiredHeight(int DesiredHeight)
-
getImageDirectory
public java.io.File getImageDirectory()
-
setImageDirectory
public void setImageDirectory(java.io.File imgDir)
-
getColourMode
public boolean getColourMode()
-
setColourMode
public void setColourMode(boolean ColourMode)
-
check
public java.util.TreeSet check()
Checks and returns any problems found with the settings of this synapse.- Specified by:
checkin interfaceNeuralElement- Overrides:
checkin classStreamInputSynapse- Returns:
- A TreeSet of problems or errors found with this synapse.
- See Also:
Synapse
-
-
DataMelt 3.0 © DataMelt by jWork.ORG