org.neuroph.contrib.imgrec
Class ImageRecognitionHelper

java.lang.Object
  extended by org.neuroph.contrib.imgrec.ImageRecognitionHelper

public class ImageRecognitionHelper
extends java.lang.Object

Provides methods to create neural network and training set for image recognition. This class is mostly based on the code from tileclassification utility by Jon Tait

Author:
Jon Tait, Zoran Sevarac

Constructor Summary
ImageRecognitionHelper()
           
 
Method Summary
static TrainingSet createBlackAndWhiteTrainingSet(java.util.List<java.lang.String> imageLabels, java.util.Map<java.lang.String,FractionRgbData> rgbDataMap)
          Creates binary black and white training set for the specified image labels and rgb data
static NeuralNetwork createNewNeuralNetwork(java.lang.String label, java.awt.Dimension samplingResolution, ColorMode colorMode, java.util.List<java.lang.String> imageLabels, java.util.Vector<java.lang.Integer> layersNeuronsCount, TransferFunctionType transferFunctionType)
          Creates and returns new neural network for image recognition.
static TrainingSet createTrainingSet(java.util.List<java.lang.String> imageLabels, java.util.Map<java.lang.String,FractionRgbData> rgbDataMap)
          Creates training set for the specified image labels and rgb data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageRecognitionHelper

public ImageRecognitionHelper()
Method Detail

createNewNeuralNetwork

public static NeuralNetwork createNewNeuralNetwork(java.lang.String label,
                                                   java.awt.Dimension samplingResolution,
                                                   ColorMode colorMode,
                                                   java.util.List<java.lang.String> imageLabels,
                                                   java.util.Vector<java.lang.Integer> layersNeuronsCount,
                                                   TransferFunctionType transferFunctionType)
Creates and returns new neural network for image recognition. Assumes that all of the FractionRgbData objects in the given map have identical length arrays in them so that the input layer of the neural network can be created here.

Parameters:
label - neural network label
samplingResolution - sampling resolution (image size)
imageLabels - image labels
layersNeuronsCount - neuron counts in hidden layers
transferFunctionType - type of transfer function to use for neurons in network
colorMode - color mode

createTrainingSet

public static TrainingSet createTrainingSet(java.util.List<java.lang.String> imageLabels,
                                            java.util.Map<java.lang.String,FractionRgbData> rgbDataMap)
Creates training set for the specified image labels and rgb data

Parameters:
imageLabels - image labels
rgbDataMap - map collection of rgb data
Returns:
training set for the specified image data

createBlackAndWhiteTrainingSet

public static TrainingSet createBlackAndWhiteTrainingSet(java.util.List<java.lang.String> imageLabels,
                                                         java.util.Map<java.lang.String,FractionRgbData> rgbDataMap)
Creates binary black and white training set for the specified image labels and rgb data

Parameters:
imageLabels - image labels
rgbDataMap - map collection of rgb data
Returns:
binary black and white training set for the specified image data