public class ImageInputSynapse extends StreamInputSynapse
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.
Modifier and Type | Field and Description |
---|---|
(package private) static long |
serialVersionUID |
cols, currentRow, EOF, InputVector, plugInListeners, tokens
Constructor and Description |
---|
ImageInputSynapse()
Creates a new instance of ImageInputSynapse
|
Modifier and Type | Method and Description |
---|---|
java.util.TreeSet |
check()
Checks and returns any problems found with the settings of this synapse.
|
boolean |
getColourMode() |
int |
getDesiredHeight() |
int |
getDesiredWidth() |
java.lang.String |
getFileFilter() |
java.io.File |
getImageDirectory() |
protected void |
initInputStream() |
void |
setColourMode(boolean ColourMode) |
void |
setDesiredHeight(int DesiredHeight) |
void |
setDesiredWidth(int DesiredWidth) |
void |
setFileFilter(java.lang.String newFileFilter) |
void |
setImageDirectory(java.io.File imgDir) |
void |
setImageInput(java.awt.Image[] theImages) |
addPlugIn, addPlugInListener, backward, dataChanged, fireDataChanged, forward, fwdGet, fwdGet, getAdvancedColumnSelector, getAllPlugInListeners, getCurrentRow, getDecimalPoint, getFirstCol, getFirstRow, getInputPatterns, getInputVector, getLastCol, getLastRow, getMaxBufSize, getPlugIn, getStream, getTokens, gotoFirstLine, gotoLine, handleExceptionWithError, handleExceptionWithWarn, InspectableTitle, Inspections, isBuffered, isEOF, isStepCounter, numColumns, readAll, readObjectBase, removeAllPlugIns, removePlugInListener, reset, resetInput, restart, revPut, setAdvancedColumnSelector, setArrays, setBuffered, setColList, setDecimalPoint, setDimensions, setEOF, setFirstCol, setFirstRow, setInputPatterns, setLastCol, setLastRow, setMaxBufSize, setPlugin, setPlugIn, setStepCounter, setTokens, writeObjectBase, zeroPattern
addNoise, canCountSteps, fwdPattern_consume, fwdPattern_produce, fwdPut, getCount, getFwdLock, getIgnoreBefore, getInputDimension, getLearner, getLearningRate, getMomentum, getMonitor, getName, getOutputDimension, getRevLock, getSynapseNameSafely, getWeights, init, initLearner, isEnabled, isInputFull, isLoopBack, isOutputFull, randomize, readResolve, revGet, revPattern_consume, revPattern_produce, setEnabled, setIgnoreBefore, setInputDimension, setInputFull, setLearningRate, setLoopBack, setMomentum, setMonitor, setName, setOutputDimension, setOutputFull, setWeights, warnLogger, warnLogger
static final long serialVersionUID
public ImageInputSynapse()
public void setFileFilter(java.lang.String newFileFilter)
public java.lang.String getFileFilter()
public void setImageInput(java.awt.Image[] theImages)
protected void initInputStream() throws JooneRuntimeException
initInputStream
in class StreamInputSynapse
JooneRuntimeException
public int getDesiredWidth()
public void setDesiredWidth(int DesiredWidth)
public int getDesiredHeight()
public void setDesiredHeight(int DesiredHeight)
public java.io.File getImageDirectory()
public void setImageDirectory(java.io.File imgDir)
public boolean getColourMode()
public void setColourMode(boolean ColourMode)
public java.util.TreeSet check()
check
in interface NeuralElement
check
in class StreamInputSynapse
Synapse
Submit Feedback to pmarrone@users.sourceforge.net