aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config')
-rw-r--r--src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/default/nn.cfg382
-rw-r--r--src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/default/nn.mdtbin0 -> 11505083 bytes
-rw-r--r--src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/default/profile.cfg1
-rw-r--r--src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/project.cfg2
-rw-r--r--src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/unicodeMapfile_alphanumeric.ini76
5 files changed, 461 insertions, 0 deletions
diff --git a/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/default/nn.cfg b/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/default/nn.cfg
new file mode 100644
index 00000000..73e13e21
--- /dev/null
+++ b/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/default/nn.cfg
@@ -0,0 +1,382 @@
+#------------------------------------------------------------------------------
+# SVN MACROS
+#
+# $LastChangedDate: 2009-06-08 19:11:25 +0530 (Mon, 08 Jun 2009) $
+# $Revision: 773 $
+# $Author: mnab $
+#
+#------------------------------------------------------------------------------
+
+#------------------------------------------------------------------------------
+# nn.cfg
+#
+# Configuration file for Nearest Neighbor Classification Method for
+# Lipi Toolkit 3.0
+#------------------------------------------------------------------------------
+
+#------------------------------------------------------------------------------
+# The standard format for the configuration entries is the name of the
+# configuration parameter seperated by an equal to sign and then the value of
+# the configuration parameter. For example:
+# ConfigurationEntryName = value
+#
+# Lines starting with a # are commnet lines
+#
+# A cfg entry is strictly a key value pair and leaving the key without the
+# value or specification of a value out of the range is not permitted
+#
+# If a cfg entry is not specified at all, then default values are used by the
+# recognizer
+#------------------------------------------------------------------------------
+
+#-------------------------------
+# PREPROCESSING
+#-------------------------------
+
+#-------------------------------------------------------------------------------
+# ResampTraceDimension
+#
+# Description: The number of target points for resampling. In other words,
+# each character will be resampled to this number of points. In case of
+# multistroke characters, this number of points will be distributed between
+# the strokes in proportion to their lengths in proportion to their initial
+# number of points.
+#
+# Valid values: Any integer > 0
+# Units: Points
+# Default value: 60
+# Typical value: Average number of points per character in the training data set.
+#-------------------------------------------------------------------------------
+ResampTraceDimension = 60
+
+
+
+#-------------------------------------------------------------------------------
+# ResampPointAllocation
+#
+# Description: Method to be used for point allocation among different strokes
+# during resampling. Two schemes have been implemented lengthbased and point
+# based. In lengthbased allocation scheme, the number of points allocated to
+# each stroke is proportional to the length of the stroke. Length of a stroke
+# is calculated as the sum of the distances between each point in the stroke.
+# In the pointbased allocation scheme, the target stroke point allocation is
+# proportional to the number of points in the initial stroke.
+#
+# Valid value: [lengthbased | pointbased]
+# Default value: lengthbased
+#-------------------------------------------------------------------------------
+ResampPointAllocation = pointbased
+
+
+#-------------------------------------------------------------------------------
+# NormDotSizeThreshold
+#
+# Description: This threshold is used to determine whether a character is a dot.
+# It is expressed in real length terms (inches) and converted internally to
+# points using knowledge of the device’s spatial resolution. If the width
+# and height are both less than this threshold, then all the points are replaced
+# with the center of the of the normalized character, basically to represent it
+# as a dot
+#
+# Valid values: Any real number > 0
+# Units: inches
+# Default value: 0.01
+# Typical value: < 0.1
+#-------------------------------------------------------------------------------
+NormDotSizeThreshold = 0.001
+
+#-------------------------------------------------------------------------------
+# NormLineWidthThreshold
+#
+# Description: This threshold is used to detect whether the character is a
+# vertical or horizontal line. If only the height is less than this threshold
+# then the character is detected as a horizontal line and if only the width is
+# less than this threshold then the character is detected as a vertical line.
+# Assuming the height is along the y-dimension and width is along the x-
+# dimension, during normalization of a horizontal line only the x-coordinates
+# are scaled and the y-coordinates are translated to the center of the character,
+# with out scaling. Similarly for the vertical line only the y-coordinates are
+# normalized and the x-coordinates are translated to the center with out scaling
+#
+# Valid values: Any real number > 0
+# Units: inches
+# Default value: 0.01
+# Typical value: < 0.1
+#-------------------------------------------------------------------------------
+NormLineWidthThreshold = 0.001
+
+#-------------------------------------------------------------------------------
+# NormPreserveAspectRatio
+#
+# Description: This parameter is used to indicate whether the aspect ratio
+# has to be preserved during normalization. The aspect ratio is the calculated
+# as maximum of (height/width , width/height). The aspect ratio is preserved only
+# if the calculated aspect ratio is greater than the threshold value specified
+# through NormPreserveAspectRatioThreshold and this configuration variable is
+# set to true. If this configuration variable is set to false the aspect ratio
+# is not preserved during normalization.
+#
+# Valid value: [true | false]
+# Default value: true
+#-------------------------------------------------------------------------------
+NormPreserveAspectRatio = false
+
+
+#-------------------------------------------------------------------------------
+# NormPreserveAspectRatioThreshold
+#
+# Description: Aspect ratio is preserved during normalization if the computed
+# aspect ratio (max(height/width, width/height)) is greater than this threshold
+# and the configuration value NormPreserveAspectRatio is set to true. During
+# aspect ratio preserving normalization, the larger of the two dimensions is
+# normalized to the standard size and the other dimension is normalized
+# proportional to the initial height and width ratio, so that the initial
+# aspect ratio is maintained.
+#
+# Valid values: Any real number >= 1
+# Default value: 3
+# Typical value: >= 1.5
+#-------------------------------------------------------------------------------
+NormPreserveAspectRatioThreshold = 1
+
+#-------------------------------------------------------------------------------
+# NormPreserveRelativeYPosition
+#
+# Description: The relative Y position is the mean of the y-coordinates in the
+# input character. During normalization if this parameter is set to true, each
+# y-coordinate of the character point is translated by the initial y-mean value,
+# so that the mean of the y-coordinates remains the same before and after
+# normalization. This is typically used in the word recognition context where
+# each stroke of the character has to be normalized separately and the relative
+# position of the strokes should be maintained even after normalization.
+#
+# Valid value: [true | false]
+# Default value: false
+#-------------------------------------------------------------------------------
+NormPreserveRelativeYPosition = false
+
+#-------------------------------------------------------------------------------
+# SmoothWindowSize
+#
+# Description: The configuration value specifies the length of the moving
+# average filter (size of the window) for smoothing the character image.
+# If this value is set to N, then each point in the input character is replaced
+# by the average of value of this point, (N-1)/2 points on the right and (N-1)/2
+# on the left of this point.
+#
+# Valid value: Any integer > 0
+# Units: Points
+# Typical value: 5
+# Default value: 3
+#-------------------------------------------------------------------------------
+SmoothWindowSize = 3
+
+#-------------------------------------------------------------------------------
+# PreprocSequence
+#
+# Description: This variable is used to specify the sequence of preprocessing
+# operations to be carried out on the input character sample before extracting
+# the features. A valid preprocessing sequence can consist of combination of one
+# or more of the functions selected from the valid values set mentioned below.
+# The CommonPreProc prefix is used specify the default preprocessing module of
+# LipiTk. The user can add his own preprocessing functions in other modules and
+# specify them in the preprocessing sequence.
+#
+# Valid values: Any sequence formed from the following set
+# CommonPreProc::normalizeSize;
+# CommonPreProc::removeDuplicatePoints;
+# CommonPreProc::smoothenTraceGroup;
+# CommonPreProc::dehookTraces;
+# CommonPreProc::normalizeOrientation;
+# CommonPreProc::resampleTraceGroup;
+# Default value: {CommonPreProc::normalizeSize,CommonPreProc::resampleTraceGroup,CommonPreProc::normalizeSize}
+#-------------------------------------------------------------------------------
+PreprocSequence={CommonPreProc::smoothenTraceGroup,CommonPreProc::normalizeSize,CommonPreProc::resampleTraceGroup,CommonPreProc::normalizeSize}
+
+
+#---------------------------------------
+# TRAINING
+#---------------------------------------
+
+#-------------------------------------------------------------------------------
+# NNTrainPrototypeSelectionMethod
+#
+# Description: This is used to specify the prototype selection method to be used
+# while training the shape recognizer. When set to hier-clustering, the
+# prototypes are selected using hierarchical clustering method.
+#
+# Valid value: [hier-clustering]
+# Default value: hier-clustering
+#-------------------------------------------------------------------------------
+NNTrainPrototypeSelectionMethod=hier-clustering
+
+
+#-------------------------------------------------------------------------------
+# NNTrainPrototypeReductionFactorPerClass
+#
+# Description: This config parameter is used only when the prototype selection
+# is clustering. This config parameter is used to specify the amount of the
+# initial prototypes to be excluded during prototype selection.
+# Set it to automatic if the number of clusters is to be determined
+# automatically. Set it to none if no prototype selection is required. If the
+# value of this parameter is set to a number between 1-100, say 25, then 75%
+# (i.e 100-25) of the initial training data are retained as prototypes.
+# This parameter can be specified only if the NNTrainNumPrototypesPerClass
+# is not specified.
+#
+# Valid value: [automatic | none | any real number from 0-100]
+# Default value: automatic
+#-------------------------------------------------------------------------------
+NNTrainPrototypeReductionFactorPerClass = 50
+
+#-------------------------------------------------------------------------------
+# NNTrainNumPrototypesPerClass
+#
+# Description: This config parameter is used only when the prototype selection
+# is clustering. This is used to specify the number of prototypes to be selected
+# from the training data. This parameter can be specified only if
+# PrototypeReductionFactor is not specified. This config entry is commented as
+# only one of NNTrainPrototypeReductionFactorPerClass or
+# NNTrainNumPrototypesPerClass can be active in a valid cfg file.
+#
+# Valid value: [automatic | none | any integer from 1-N]
+# (N is the number of samples # per class)
+# Default value: automatic
+#-------------------------------------------------------------------------------
+#NNTrainNumPrototypesPerClass=automatic
+
+# Note: Only one of either PrototypeReductionFactor or NumClusters can be
+# enabled at any particular instance
+
+#-----------------------------------------
+# FEATURE EXTRACTION
+#-----------------------------------------
+
+#-------------------------------------------------------------------------------
+# FeatureExtractor
+#
+# Description: The configuration value is used to specify the feature extraction
+# module to be used for feature extraction. The point float feature extraction
+# module extracts the x,y,cosine and sine angle features at every point of the
+# character.
+#
+# Valid value: [PointFloatShapeFeatureExtractor|L7ShapeFeatureExtractor|
+# NPenShapeFeatureExtractor|SubStrokeShapeFeatureExtractor]
+# Default value: PointFloatShapeFeatureExtractor
+#-------------------------------------------------------------------------------
+FeatureExtractor=PointFloatShapeFeatureExtractor
+
+#-----------------------------------------
+# RECOGNITION
+#-----------------------------------------
+
+#-------------------------------------------------------------------------------
+# NNRecoDTWEuFilterOutputSize
+#
+# Description: This config parameter is used to set the number of nearest
+# neighbours (filtered based on euclidean distance)to be considered for
+# calculating dtw distance. Set to all if all samples are to be considered for
+# calculating dtw distance. This is mainly used to increase the speed of
+# recognition.
+#
+# Valid value: [all| any integer from 1-N](N is the size of prototype set)
+# Default Value: all
+#-------------------------------------------------------------------------------
+NNRecoDTWEuFilterOutputSize = 15
+
+#-------------------------------------------------------------------------------
+# NNRecoRejectThreshold
+#
+# Description: Threshold to reject the test sample. If the confidence obtained
+# for the recognition of test sample is less than this threshold then the test
+# sample is rejected.
+#
+# Valid value: Any real number from 0-1
+# Default value: 0.001
+#-------------------------------------------------------------------------------
+NNRecoRejectThreshold = 0.001
+
+#-------------------------------------------------------------------------------
+# NNRecoNumNearestNeighbors
+#
+# Description: Number of nearest neighbors to be considered during recognition
+# and computation of confidence. If the value is set to 1, nearest neighbor
+# classifier is used, otherwise k-nearest neighbor or Adaptive k-nearest
+# neighbor classifiers are used. By default, nearest neighbor classifier is used.
+#
+# Valid value: Any integer >= 1
+# Default value: 1
+#-------------------------------------------------------------------------------
+NNRecoNumNearestNeighbors = 4
+
+#-------------------------------------------------------------------------------
+# NNRecoUseAdaptiveKNN
+#
+# Description: This parameter is used to specify whether Adaptive k-nearest
+# neighbor recognizer (A-kNN) is to be used. If set to true, A-kNN recognizer is
+# used, otherwise kNN recognizer is used. The A-kNN recognizer automatically
+# determines the number of nearest neighbors to be considered for recognition in
+# each class. If NNRecoNumNearestNeighbors is set to 1, this parameter is
+# automatically set to false and the manually set value will not be considered.
+#
+# Valid value: [true | false]
+# Default value: false
+#-------------------------------------------------------------------------------
+NNRecoUseAdaptiveKNN = false
+
+#--------------------------------------------
+# COMMON FOR TRAINING AND RECOGNITION
+#--------------------------------------------
+
+#-------------------------------------------------------------------------------
+# NNPrototypeDistanceMeasure
+#
+# Description: This configuration parameter is used to specify the distance
+# measure to be used in clustering and recognition. DTW or Euclidean distance
+# measures can be used.
+#
+# Valid value [dtw | eu]
+# Default value: dtw
+#-------------------------------------------------------------------------------
+NNPrototypeDistanceMeasure = dtw
+
+#-------------------------------------------------------------------------------
+# NNDTWBandingRadius
+#
+# Description: This configuration parameter specifies the banding radius
+# to be used for DTW computation. This is used to speed up the computation
+# process. If this value is zero no banding is done. The value is specified as
+# fraction of ResampTraceDimension to be used while computing the DTW
+# distance.
+#
+# Valid values: Any real number > 0 and <= 1
+# Default Value: 0.33
+#-------------------------------------------------------------------------------
+NNDTWBandingRadius=0.33
+
+#-------------------------------------------------------------------------------
+# NNMDTFileUpdateFreq
+#
+# Description: This configuration parameter specifies the number of iterations after
+# which MDT file is to be updated.
+# Every call to addClass or deleteClass will add/delete the given class. These
+# in-memory changes will be reflected in nn.mdt only after the specified
+# number of such iterations and on application exit.
+#
+# Valid values: Any integer > 0
+# Default value: 5
+# Typical value: 5
+#-------------------------------------------------------------------------------
+NNMDTFileUpdateFreq = 5
+
+#-------------------------------------------------------------------------------
+# NNDTWBandingRadius
+#
+# Description: This configuration parameter specifies the mode for
+# opening the mdt file.
+#
+# Valid values: ascii, binary
+# Default Value: ascii
+#-------------------------------------------------------------------------------
+
+NNMDTFileOpenMode=binary
diff --git a/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/default/nn.mdt b/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/default/nn.mdt
new file mode 100644
index 00000000..3941986b
--- /dev/null
+++ b/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/default/nn.mdt
Binary files differ
diff --git a/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/default/profile.cfg b/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/default/profile.cfg
new file mode 100644
index 00000000..ddf5704f
--- /dev/null
+++ b/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/default/profile.cfg
@@ -0,0 +1 @@
+ShapeRecMethod = nn
diff --git a/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/project.cfg b/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/project.cfg
new file mode 100644
index 00000000..32fe6ba1
--- /dev/null
+++ b/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/project.cfg
@@ -0,0 +1,2 @@
+ProjectType = SHAPEREC
+NumShapes = dynamic
diff --git a/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/unicodeMapfile_alphanumeric.ini b/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/unicodeMapfile_alphanumeric.ini
new file mode 100644
index 00000000..7b75d3f0
--- /dev/null
+++ b/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/projects/alphanumeric/config/unicodeMapfile_alphanumeric.ini
@@ -0,0 +1,76 @@
+#Font name
+Font=english
+
+#Mapping of character class ids to unicode value
+0= 0X0041
+1= 0X0042
+2= 0X0043
+3= 0X0044
+4= 0X0045
+5= 0X0046
+6= 0X0047
+7= 0X0048
+8= 0X0049
+9= 0X004A
+10= 0X004B
+11= 0X004C
+12= 0X004D
+13= 0X004E
+14= 0X004F
+15= 0X0050
+16= 0X0051
+17= 0X0052
+18= 0X0053
+19= 0X0054
+20= 0X0055
+21= 0X0056
+22= 0X0057
+23= 0X0058
+24= 0X0059
+25= 0X005A
+26= 0X0061
+27= 0X0062
+28= 0X0063
+29= 0X0064
+30= 0X0065
+31= 0X0066
+32= 0X0067
+33= 0X0068
+34= 0X0069
+35= 0X006A
+36= 0X006B
+37= 0X006C
+38= 0X006D
+39= 0X006E
+40= 0X006F
+41= 0X0070
+42= 0X0071
+43= 0X0072
+44= 0X0073
+45= 0X0074
+46= 0X0075
+47= 0X0076
+48= 0X0077
+49= 0X0078
+50= 0X0079
+51= 0X007A
+52= 0X0030
+53= 0X0031
+54= 0X0032
+55= 0X0033
+56= 0X0034
+57= 0X0035
+58= 0X0036
+59= 0X0037
+60= 0X0038
+61= 0X0039
+62= 0X002E
+63= 0X002C
+64= 0X003F
+65= 0X002D
+66= 0X0040
+67= 0X003A
+68= 0X003B
+69= 0X0028
+70= 0X0029
+71= 0X002B \ No newline at end of file