org.yccheok.numrecognition
Class FeatureParameter

java.lang.Object
  extended by org.yccheok.numrecognition.FeatureParameter

public class FeatureParameter
extends java.lang.Object

The parameter of image feature.


Field Summary
static FeatureParameter DEFAULT_FEATURE_PARAMETER
          The default setting of feature parameter.
 boolean dilateEnable
          Whether dilate should be performed during image pre-processing.
 int idealImageSize
          Images will be scaled to this size during training and recognition.
 boolean roiToLargestBlob
          Setting this to true will draw a ROI around the largest object in the image.
 
Constructor Summary
FeatureParameter(int idealImageSize, boolean dilateEnable, boolean roiToLargestBlob)
          Construct a feature parameter with specified ideal image size, dilate enable and roi to largest blob enable.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FEATURE_PARAMETER

public static final FeatureParameter DEFAULT_FEATURE_PARAMETER
The default setting of feature parameter. (ideal image size=16, dilate disable and roi to largest blob enable)


idealImageSize

public final int idealImageSize
Images will be scaled to this size during training and recognition.


dilateEnable

public final boolean dilateEnable
Whether dilate should be performed during image pre-processing. If there aren't too many broken components of an number object, this value should be set to false to preserve the originality of the image. Otherwise, Setting this value to true may connect up the broken component. However, it will also connect up some pixel which is supposed to be seperated.


roiToLargestBlob

public final boolean roiToLargestBlob
Setting this to true will draw a ROI around the largest object in the image. This is assuming that number is the largest object in the image. Setting this value to true may get a better size normalized number. However, the image object should be well connected component. It is advised if this value is set to true, dilateEnable should also be set to true.

Constructor Detail

FeatureParameter

public FeatureParameter(int idealImageSize,
                        boolean dilateEnable,
                        boolean roiToLargestBlob)
Construct a feature parameter with specified ideal image size, dilate enable and roi to largest blob enable.

Parameters:
idealImageSize - The size which the number image will be scaled to during pre processing.
dilateEnable - Whether dilate will be performed during pre processing.
roiToLargestBlob - Whether largest blob will be extracted out from the image.