Segment

Use the Segment tab to manually choose the best parameters that separate the characters from the background as well as separate the characters from each other. Cognex recommends using the auto-tuning capabilities supported in the Tune tab and allow the tool to determine those segmentation settings automatically. Refer to the topic Choosing Segmentation Parameters for details on which parameters to modify for the images your vision application acquires.

Parameter Description
Character Min Width The minimum width of a character's mark rectangle, in pixels, that a character must have in order to be reported
Character Max Width The maximum allowable width of a character's mark rectangle, in pixels. A character wider than this value will be split into pieces that are not too wide
Polarity The polarity of the characters in the input image. If the polarity is Unknown, the polarity will be automatically determined
Character Min Height The minimum height of a character's mark rectangle, in pixels, that a character must have in order to be reported
Character Max Height The maximum allowable height of a character's mark rectangle, in pixels. This value is used in two ways. First, this value is used when finding the line as a whole, e.g. to reject vertically adjacent noise and/or other lines of vertically adjacent characters. Second, an individual character whose height exceeds this value will be trimmed to meet this height.
Space Insert Mode The insert mode, which specifies how to handle insertion of space characters into gaps between other characters
Space Min Width The minimum width of a space character, in pixels
Space Max Width The maximum width of a space character, in pixels.
Character Min Aspect The minimum allowable aspect of a character, where the aspect is defined as the height of the entire line of characters divided by the width of the character's mark rectangle. A character whose aspect is smaller than this value (i.e. whose width is too large) will be split into pieces that are not too wide.
Normalization Mode The method used to normalize the input image. Choosing the right value can reduce the execution time of the tool.
Character Min Num Pels The minimum number of foreground (i.e. text) pixels that a character must have in order to be reported
Analysis Mode Whether to perform minimal analysis or standard analysis. Minimal analysis performs straightforward segmentation according to the parameters set in this tab, while standard analysis performs an analysis of the line as a whole, including e.g. character spacing, to determine the optimal segmentation.
Min Intercharacter Gap The minimum gap size, in pixels, that can occur between two characters. If the gap between two fragments is smaller than this, then they must be considered to be part of the same character, unless the combined character would be too wide (as specified by Character Max Width and/or Character Min Aspect). The gap is measured from the right edge of the mark rectangle of one character to the left edge of the mark rectangle of the next character.
Max Intracharacter Gap The maximum gap size, in pixels, that can occur within a single character, even for damaged characters. An intracharacter gap might occur, for example, between successive columns of dots in dot matrix print, or between two pieces of a solid character that was damaged by a scratch. Any gap larger than this value will always be interpreted as a break between two separate characters, whereas gaps less than or equal to this value may be interpreted either as a break between two separate characters or as a gap within a single character.
Pitch Metric The metric used to specify the spacing of characters. Note that pitch is the distance between (approximately) corresponding points on adjacent characters and not the distance from the end of one character to the beginning of the next character (which is called the "intercharacter gap"). Also note that specifying the pitch metric does not necessarily imply that the measured pitch values are expected to be constant.
Pitch Type How individual pitch values are expected to vary; the pitch values are measured as specified by the pitch metric.
Width Type How the widths of characters in the font are expected to vary. Note that the character width is the width of the mark rectangle (e.g. the bounding box of the ink), not the cell rectangle (which would typically include padding around the mark rectangle).
Min Pitch The minimum pitch, in pixels, that can occur between two characters, where the pitch is computed as specified by the pitch metric. If the pitch between two fragments is smaller than this, then they must be considered to be part of the same character, unless the combined character would be too wide (as specified by Character Max Width and/or Character Min Aspect).
Angle Half Range Half of the angle search range in radians.
Skew Half Range Half of the skew search range in radians.
Space Score Mode The score mode, which specifies how to handle scoring of space characters.
Foreground Threshold Frac A modifier in the range [0, 1] that is used to compute the binarization threshold, in the normalized image, that binarizes between foreground and background.
Use Stroke Width Filter Whether to remove from the normalized image everything that does not appear to have the same stroke width as the rest of the image. This can be useful if, for example, characters appear to be connected to each other by thin noise streaks. However, using the stroke width filter might incorrectly remove real characters if the stroke widths are inconsistent.
Ignore Border Fragments Whether to completely ignore any fragments that touch any border of the ROI. Ignoring such fragments can be useful for non-text features such as the edges of labels that might be included within the ROI.
Character Min Num Pels The minimum number of foreground (i.e. text) pixels that a character must have in order to be reported.
Character Fragment Min X Overlap The minimum fraction by which two character fragments must overlap each other in the x direction in order for the two fragments to be considered part of the same character.
Character Fragment Contrast Threshold The minimum amount of contrast (in normalized image grey levels) that a fragment must have, relative to the binarization threshold, in order to be considered for possible inclusion in a character. See the comments for Foreground Threshold Frac for the value of the binarization threshold.
Character Fragment Max Distance To MainLine Get/set a modifier in the range [0, 1] this is the maximum distance a fragment can have outside the main line of characters as percentage of estimated line height in order to be included.
Character Fragment Merge Mode Get/set the mode used to determine whether to merge two fragments into one character during the Group stage.
Cell Rectangle Width Type Determines how the tool computes the width of the cell rectangle surrounding a character.