System MarshalByRefObject
Cognex.VisionPro.Implementation CogObjectBase
Cognex.VisionPro.Implementation CogSerializableObjectBase
Cognex.VisionPro.Implementation CogSerializableChangedEventBase
Cognex.VisionPro.OCRMax CogOCRMaxSegmenter
Namespace: Cognex.VisionPro.OCRMax
Assembly: Cognex.VisionPro.OCRMax (in Cognex.VisionPro.OCRMax.dll) Version: 73.0.0.0
The CogOCRMaxSegmenter type exposes the following members.
| Name | Description | |
|---|---|---|
| CogOCRMaxSegmenter |
Construct a default CogOCRMaxSegmenter object.
| |
| CogOCRMaxSegmenter(CogOCRMaxSegmenter) |
Constructs a deep copy of the supplied CogOCRMaxSegmenter object.
| |
| CogOCRMaxSegmenter(SerializationInfo, StreamingContext) |
Serialization constructor for CogOCRMaxSegmenter.
|
| Name | Description | |
|---|---|---|
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
| Equals | (Inherited from Object.) | |
| Execute(CogImage16Grey) |
Segment one line of characters contained within the image.
| |
| Execute(CogImage16Range) |
Segment one line of characters contained within the image.
| |
| Execute(CogImage8Grey) |
Segment one line of characters contained within the image.
| |
| Execute(CogImage16Grey, CogRectangleAffine) |
Segment one line of characters contained within the region.
| |
| Execute(CogImage16Grey, CogRectangleAffine ) |
Segment several lines of characters contained within the search regions.
| |
| Execute(CogImage16Range, CogRectangleAffine) |
Segment one line of characters contained within the 2D region.
| |
| Execute(CogImage16Range, CogRectangleAffine ) |
Segment several lines of characters contained within the search regions.
| |
| Execute(CogImage8Grey, CogRectangleAffine) |
Segment one line of characters contained within the region.
| |
| Execute(CogImage8Grey, CogRectangleAffine ) |
Segment several lines of characters contained within the search regions.
| |
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| GetAttributes |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetClassName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetComponentName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetConverter |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultEvent |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultProperty |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEditor |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| GetObjectData |
Implements the GetObjectData method of the ISerializable interface.
(Inherited from CogSerializableObjectBase.) | |
| GetProperties |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetProperties( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetPropertyOwner |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
| OnChanged(Int64) |
This method should be called internally whenever the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) | |
| OnChanged(CogChangedEventArgs) |
This method may be called internally whenever a derived object's state
may have changed and the derived object expresses this change via a
derived CogChangedEventArgs class.
(Inherited from CogSerializableChangedEventBase.) | |
| ResumeAndRaiseChangedEvent |
Re-enables raising of the Changed event after SuspendChangedEvent
has been called, and raises the Changed event if the
ChangedEventSuspended count is reduced to zero and any changes were
made while events were suspended. Must be called once for each call to
SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.) | |
| SuspendChangedEvent |
Temporarily suspends the raising of the Changed event. May be called
more than once, and a corresponding call to ResumeAndRaiseChangedEvent
must be made for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.) | |
| ToString | (Inherited from Object.) |
| Name | Description | |
|---|---|---|
| SfAnalysisMode |
This bit will be set in the EventArgs of a Changed event every time the
value returned by AnalysisMode may have changed.
| |
| SfAngleHalfRange |
This bit will be set in the EventArgs of a Changed event every time the
value returned by AngleHalfRange may have changed.
| |
| SfCellRectangleWidthType |
This bit will be set in the EventArgs of a Changed event every time the
value returned by CellRectangleWidthType may have changed.
| |
| SfCharacterFragmentContrastThreshold |
This bit will be set in the EventArgs of a Changed event every time the
value returned by CharacterFragmentContrastThreshold may have changed.
| |
| SfCharacterFragmentMainLineMinYOverlapFrac |
This bit will be set in the EventArgs of a Changed event every time the
value returned by CharacterFragmentMainLineMinYOverlapFrac may have changed.
| |
| SfCharacterFragmentMaxDistanceToMainLine |
This bit will be set in the EventArgs of a Changed event every time the
value returned by CharacterFragmentMaxDistanceToMainLine may have changed.
| |
| SfCharacterFragmentMergeMode |
This bit will be set in the EventArgs of a Changed event every time the
value returned by CharacterFragmentMergeMode may have changed.
| |
| SfCharacterFragmentMinNumPels |
This bit will be set in the EventArgs of a Changed event every time the
value returned by CharacterFragmentMinNumPels may have changed.
| |
| SfCharacterFragmentMinXOverlap |
This bit will be set in the EventArgs of a Changed event every time the
value returned by CharacterFragmentMinXOverlap may have changed.
| |
| SfCharacterMaxHeight |
This bit will be set in the EventArgs of a Changed event every time the
value returned by CharacterMaxHeight may have changed.
| |
| SfCharacterMaxWidth |
This bit will be set in the EventArgs of a Changed event every time the
value returned by CharacterMaxWidth may have changed.
| |
| SfCharacterMinAspect |
This bit will be set in the EventArgs of a Changed event every time the
value returned by CharacterMinAspect may have changed.
| |
| SfCharacterMinHeight |
This bit will be set in the EventArgs of a Changed event every time the
value returned by CharacterMinHeight may have changed.
| |
| SfCharacterMinNumPels |
This bit will be set in the EventArgs of a Changed event every time the
value returned by CharacterMinNumPels may have changed.
| |
| SfCharacterMinWidth |
This bit will be set in the EventArgs of a Changed event every time the
value returned by CharacterMinWidth may have changed.
| |
| SfComputeDiagnostics |
This bit will be set in the EventArgs of a Changed event every time the
value returned by ComputeDiagnostics may have changed.
| |
| SfForegroundThresholdFrac |
This bit will be set in the EventArgs of a Changed event every time the
value returned by ForegroundThresholdFrac may have changed.
| |
| SfIgnoreBorderFragments |
This bit will be set in the EventArgs of a Changed event every time the
value returned by IgnoreBorderFragments may have changed.
| |
| SfLineRefinementMode |
This bit will be set in the EventArgs of a Changed event every time the
value returned by LineRefinementMode may have changed.
| |
| SfMaxIntracharacterGap |
This bit will be set in the EventArgs of a Changed event every time the
value returned by MaxIntracharacterGap may have changed.
| |
| SfMinIntercharacterGap |
This bit will be set in the EventArgs of a Changed event every time the
value returned by MinIntercharacterGap may have changed.
| |
| SfMinPitch |
This bit will be set in the EventArgs of a Changed event every time the
value returned by MinPitch may have changed.
| |
| SfNextSf | ||
| SfNormalizationMode |
This bit will be set in the EventArgs of a Changed event every time the
value returned by NormalizationMode may have changed.
| |
| SfPitchMetric |
This bit will be set in the EventArgs of a Changed event every time the
value returned by PitchMetric may have changed.
| |
| SfPitchType |
This bit will be set in the EventArgs of a Changed event every time the
value returned by PitchType may have changed.
| |
| SfPolarity |
This bit will be set in the EventArgs of a Changed event every time the
value returned by Polarity may have changed.
| |
| SfSkewHalfRange |
This bit will be set in the EventArgs of a Changed event every time the
value returned by SkewHalfRange may have changed.
| |
| SfSpaceParams |
This bit will be set in the EventArgs of a Changed event every time the
value returned by SpaceParams may have changed.
| |
| SfTimeout |
This bit will be set in the EventArgs of a Changed event every time the
value returned by Timeout may have changed.
| |
| SfTimeoutEnabled |
This bit will be set in the EventArgs of a Changed event every time the
value returned by TimeoutEnabled may have changed.
| |
| SfUseCharacterMaxHeight |
This bit will be set in the EventArgs of a Changed event every time the
value returned by UseCharacterMaxHeight may have changed.
| |
| SfUseCharacterMaxWidth |
This bit will be set in the EventArgs of a Changed event every time the
value returned by UseCharacterMaxWidth may have changed.
| |
| SfUseCharacterMinAspect |
This bit will be set in the EventArgs of a Changed event every time the
value returned by UseCharacterMinAspect may have changed.
| |
| SfUseStrokeWidthFilter |
This bit will be set in the EventArgs of a Changed event every time the
value returned by UseStrokeWidthFilter may have changed.
| |
| SfWidthType |
This bit will be set in the EventArgs of a Changed event every time the
value returned by WidthType may have changed.
|
| Name | Description | |
|---|---|---|
| AnalysisMode |
Whether to perform "minimal analysis" or "standard analysis". Minimal
analysis performs straightforward segmentation according to the
parameters above. Standard analysis performs an analysis of the line as
a whole, including e.g. character spacing, to determine the optimal
segmentation.
| |
| AngleHalfRange |
Half of the angle search range in radians.
| |
| CellRectangleWidthType |
How to compute the width of a character's cell rectangle.
| |
| ChangedEventSuspended |
If nonzero, indicates that the raising of the Changed event has been
suspended. This value is incremented when SuspendChangedEvent is called
and decremented when ResumeAndRaiseChangedEvent is called.
(Inherited from CogSerializableChangedEventBase.) | |
| CharacterFragmentContrastThreshold |
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 ForegroundThresholdFrac() for the value of the binarization
threshold.
| |
| CharacterFragmentMainLineMinYOverlapFrac |
Get/set the minimum fraction by which a character fragment must overlap the
mainline of characters in order for the fragment to be included.
| |
| CharacterFragmentMaxDistanceToMainLine |
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.
| |
| CharacterFragmentMergeMode |
Get/set the mode used to determine whether to merge two fragments into
one character during the Group stage.
| |
| CharacterFragmentMinNumPels |
The minimum number of foreground (i.e. text) pixels that a fragment
must have in order to be considered for possible inclusion in a
character. A character fragment is a blob in the binarized image.
| |
| CharacterFragmentMinXOverlap |
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.
| |
| CharacterMaxHeight |
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.
| |
| CharacterMaxWidth |
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.
| |
| CharacterMinAspect |
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.
| |
| CharacterMinHeight |
The minimum height of a character's mark rectangle, in pixels, that a
character must have in order to be reported.
| |
| CharacterMinNumPels |
The minimum number of foreground (i.e. text) pixels that a character
must have in order to be reported.
| |
| CharacterMinWidth |
The minimum width of a character's mark rectangle, in pixels, that a
character must have in order to be reported.
| |
| ComputeDiagnostics |
Whether to compute additional segmenter diagnostics information
when the segmenter is run.
| |
| ForegroundThresholdFrac |
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.
| |
| HasChanged | (Inherited from CogSerializableChangedEventBase.) | |
| IgnoreBorderFragments |
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.
| |
| LineRefinementMode |
Cognex Internal Use Only
| |
| MaxIntracharacterGap |
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.
| |
| MinIntercharacterGap |
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 CharacterMaxWidth and/or
CharacterMinAspect). 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.
| |
| MinPitch |
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 CharacterMaxWidth and/or
CharacterMinAspect).
| |
| NormalizationMode |
The method used to normalize the input image.
| |
| PitchMetric |
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.
| |
| PitchType |
How individual pitch values are expected to vary;
the pitch values are measured as specified by the pitch
metric.
| |
| Polarity |
The polarity of the characters in the input image. If the polarity is
Unknown, the polarity will be automatically determined.
| |
| SkewHalfRange |
Half of the skew search range in radians.
| |
| SpaceParams |
Parameters to control whether and how to insert space characters.
| |
| StateFlags |
Returns the complete set of state flags supported on this object. The
flags may be indexed by name as shown in the following C# code snippet:
if (changedObject.StateFlags["Color"] & eventArgs.StateFlags) { ... }
(Inherited from CogSerializableChangedEventBase.) | |
| Timeout |
Gets or sets the timeout for running the segmenter in milliseconds.
| |
| TimeoutEnabled |
Enables the timeout for the segmenter.
| |
| UseCharacterMaxHeight |
Whether to use CharacterMaxHeight to limit the maximum height of a
character and/or the line of characters.
| |
| UseCharacterMaxWidth |
Whether to use CharacterMaxWidth to split wide characters.
| |
| UseCharacterMinAspect |
Whether to use CharacterMinAspect to split wide characters.
| |
| UseStrokeWidthFilter |
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.
| |
| WidthType |
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).
|
| Name | Description | |
|---|---|---|
| Changed |
This event is raised when one or more parts of the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) |
Each segmenter property is used in one or more stages of segmentation; each property will note which stage(s) it is used in with a comment of the form "Stage: Name", where "Name" is one of the stages listed below.
1) Refine line --- Determine line location, angle, skew, and/or polarity.
2) Normalize --- Normalize the input image to produce a normalized image. The normalized image should be binarizable using a single global threshold.
3) Binarize --- Determine a threshold and use it to binarize the normalized image to produce a binarized image.
4) Fragment --- Perform blob analysis to produce character fragments, where each character fragment is a single blob.
5) Group --- Group character fragments together to form characters. Grouping may include merging and/or splitting fragments. Small characters may be discarded.
6) Analyze --- Optionally perform additional analysis to determine a more optimal grouping.
The OCRMax Segmenter splits a line of text in an image into images of the individual characters. The user specifies a CogRectangleAffine as a region of interest (ROI) that specifies the approximate location, angle, and skew of the line of text. The Segmenter is capable of refining the angle and skew of the line if requested.
The x axis of the affine rectangle should be parallel to the baseline of the text, and the y axis should be parallel to the vertical strokes of the characters; if there is no skew, the y axis is perpendicular to the x axis. The positive direction of the x axis corresponds to the reading direction. (Note that the baseline of the text may have any angle 0-360 in the image, as long as the affine rectangle is oriented at approximately the same angle.
The ROI is expected to contain only the one line of text to be read and some surrounding background. The background is allowed to be noisy and it may have significant background gradients/shading. In images that are clearly printed and have little noise, the ROI may be significantly larger than the line of text; noisy images may require that the ROI be relatively tight around the line of text. Note that the ROI should not contain significant image features other than the line of text; for example, it should not partially enclose a different nearby line of text, nor should it enclose a label edge.
As an approximate rule of thumb, the ROI should be larger than the line of text by at least half a character width on all sides if possible (i.e. unless a border that large would cause other features to be enclosed within the ROI).
It is important to note that the OCRMax Segmenter tool is not a general purpose string finder; it is not capable of finding a string in an arbitrarily complex image with a large ROI.