📄 nn.cfg
字号:
#------------------------------------------------------------------------------
# nn.cfg
#
# Configuration file for Nearest Neighbor Classification Method for
# Lipi Toolkit 2.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 = lengthbased
#-------------------------------------------------------------------------------
# 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抯 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.01
#-------------------------------------------------------------------------------
# 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.01
#-------------------------------------------------------------------------------
# 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 = true
#-------------------------------------------------------------------------------
# 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 = 3
#-------------------------------------------------------------------------------
# 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
#-------------------------------------------------------------------------------
# NNPreprocSequence
#
# 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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -