The EObjectTemplateMatcher class is a tool designed to align and match the output of EasyObject to a reference template. More...


Public Member Functions | |
| EObjectTemplateMatcher () | |
| Creates an EObjectTemplateMatcher object. | |
| EObjectTemplateMatcher (eVision.EObjectTemplateMatcher other) | |
| Creates an EObjectTemplateMatcher object. | |
| void | Load (string path) |
| Load the EObjectTemplateMatcher configuration. The given ESerializer must have been created for reading. | |
| void | Load (eVision.ESerializer serializer) |
| Load the EObjectTemplateMatcher configuration. The given ESerializer must have been created for reading. | |
| void | Save (string path) |
| Save the EObjectTemplateMatcher configuration. The given ESerializer must have been created for writing. | |
| void | Save (eVision.ESerializer serializer) |
| Save the EObjectTemplateMatcher configuration. The given ESerializer must have been created for writing. | |
| void | BuildTemplate (eVision.EObjectSelection selection, eVision.EFrame frame) |
| Set the reference template from a previous EasyObject coded image, an object selection or a list of known positions. | |
| void | BuildTemplate (eVision.EObjectSelection selection) |
| Set the reference template from a previous EasyObject coded image, an object selection or a list of known positions. | |
| void | BuildTemplate (eVision.ECodedImage2 objects, eVision.EFrame frame) |
| Set the reference template from a previous EasyObject coded image, an object selection or a list of known positions. | |
| void | BuildTemplate (eVision.ECodedImage2 objects) |
| Set the reference template from a previous EasyObject coded image, an object selection or a list of known positions. | |
| void | BuildTemplate (eVision.EPoint[] positions, eVision.EFrame frame) |
| Set the reference template from a previous EasyObject coded image, an object selection or a list of known positions. | |
| void | BuildTemplate (eVision.EPoint[] positions) |
| Set the reference template from a previous EasyObject coded image, an object selection or a list of known positions. | |
| void | SortSelection (eVision.EObjectSelection selection) |
| Align and match the given selection with the reference template. | |
| void | SortPositions (eVision.EPoint[] positions) |
| Align and match the given position array with the reference template. | |
| bool | Match (eVision.EPoint[] positions) |
| Align and match the given items with the reference template. | |
| bool | Match (eVision.EPoint[] positions, eVision.EFrame frame) |
| Align and match the given items with the reference template. | |
| bool | Match (eVision.EObjectSelection selection, eVision.EFrame frame) |
| Align and match the given items with the reference template. | |
| bool | Match (eVision.EObjectSelection selection) |
| Align and match the given items with the reference template. | |
| eVision.EObjectSelection | GetMatched (eVision.EObjectSelection selection, bool fromSelection) |
| Returns the matched objects in the order in which they appear in the template. EObjectTemplateMatcher.Match must be called before this method. | |
| eVision.EObjectSelection | GetMatched (eVision.EObjectSelection selection) |
| Returns the matched objects in the order in which they appear in the template. EObjectTemplateMatcher.Match must be called before this method. | |
| eVision.EPoint[] | GetMatched (eVision.EPoint[] positions, bool fromSelection) |
| Returns the matched objects in the order in which they appear in the template. EObjectTemplateMatcher.Match must be called before this method. | |
| eVision.EPoint[] | GetMatched (eVision.EPoint[] positions) |
| Returns the matched objects in the order in which they appear in the template. EObjectTemplateMatcher.Match must be called before this method. | |
| eVision.EObjectSelection | GetExtra (eVision.EObjectSelection selection) |
| Returns the objects in the selection that do not appear in the template, in the order in which they appear in the selection. EObjectTemplateMatcher.Match must be called before this method. | |
| eVision.EPoint[] | GetExtra (eVision.EPoint[] positions) |
| Returns the objects in the selection that do not appear in the template, in the order in which they appear in the selection. EObjectTemplateMatcher.Match must be called before this method. | |
| eVision.EObjectSelection | GetMissing (eVision.EObjectSelection templateSelection) |
| Returns the template objects that were not matched, in the order in which they appeared in the template. EObjectTemplateMatcher.Match must be called before this method. | |
| eVision.EPoint[] | GetMissing (eVision.EPoint[] templatePositions) |
| Returns the template objects that were not matched, in the order in which they appeared in the template. EObjectTemplateMatcher.Match must be called before this method. | |
| void | GetUnpairedObjects (ref int[] onlyInTemplate, ref int[] onlyInSelection) |
| Return lists of object indexes that appear only in template or only in selection. | |
Properties | |
| bool | EnableAlignment [get, set] |
| Enable an optional preliminary global alignement (rigid transformation only: translation and rotation). Enable alignment only if the selection is not aligned with the template. | |
| eVision.EObjectTemplateMatcherAlignment | Alignment [get, set] |
| Sets optional preliminary alignement (rigid transformation only: translation and rotation). Choose to enable alignment only if the selection is not aligned with the template. Three types of alignment are possible. See EObjectTemplateMatcherAlignment. The max rotation of the alignment can be set by EObjectTemplateMatcher.MaximumAngle. By default, no alignment is performed. | |
| float | MaximumAngle [get, set] |
| When EObjectTemplateMatcher.Alignment is set to EObjectTemplateMatcherAlignment.EObjectTemplateMatcherAlignment_Fast or EObjectTemplateMatcherAlignment.EObjectTemplateMatcherAlignment_Robust, the alignment can be constrained to a given angle range. This is useful to filter out symmetries and makes EObjectTemplateMatcherAlignment.EObjectTemplateMatcherAlignment_Robust faster. Defaults to 180°. | |
| float | MaximumDistance [get, set] |
| Defines the absolute maximum distance (in pixels) for a match to be valid. That value is used during the closest object search. By default, infinite distance is used. | |
| int[] | TemplateIndexes [get] |
| For each object in the SELECTION return the paired index in the TEMPLATE. If the object has no match, the value -1 is used. | |
| int[] | SelectionIndexes [get] |
| For each object in the TEMPLATE return the paired index in the SELECTION. if the object has no match, the value -1 is used. | |
| int | NumberOfPairedObjects [get] |
| Return the number of paired objects. | |
The EObjectTemplateMatcher class is a tool designed to align and match the output of EasyObject to a reference template.
License(s): EasyObject
| eVision.EObjectTemplateMatcher.EObjectTemplateMatcher | ( | ) |
Creates an EObjectTemplateMatcher object.
| eVision.EObjectTemplateMatcher.EObjectTemplateMatcher | ( | eVision.EObjectTemplateMatcher | other | ) |
Creates an EObjectTemplateMatcher object.
| other | Reference to the EObjectTemplateMatcher used for the initialization. |
| void eVision.EObjectTemplateMatcher.BuildTemplate | ( | eVision.ECodedImage2 | objects | ) |
Set the reference template from a previous EasyObject coded image, an object selection or a list of known positions.
| objects | The coded image to be used as template. |
| void eVision.EObjectTemplateMatcher.BuildTemplate | ( | eVision.ECodedImage2 | objects, |
| eVision.EFrame | frame ) |
Set the reference template from a previous EasyObject coded image, an object selection or a list of known positions.
| objects | The coded image to be used as template. |
| frame | The frame in which the other arguments are expressed. |
| void eVision.EObjectTemplateMatcher.BuildTemplate | ( | eVision.EObjectSelection | selection | ) |
Set the reference template from a previous EasyObject coded image, an object selection or a list of known positions.
| selection | The object selection to be used as template. |
| void eVision.EObjectTemplateMatcher.BuildTemplate | ( | eVision.EObjectSelection | selection, |
| eVision.EFrame | frame ) |
Set the reference template from a previous EasyObject coded image, an object selection or a list of known positions.
| selection | The object selection to be used as template. |
| frame | The frame in which the other arguments are expressed. |
| void eVision.EObjectTemplateMatcher.BuildTemplate | ( | eVision.EPoint[] | positions | ) |
Set the reference template from a previous EasyObject coded image, an object selection or a list of known positions.
| positions | The list of positions to be used as template. |
| void eVision.EObjectTemplateMatcher.BuildTemplate | ( | eVision.EPoint[] | positions, |
| eVision.EFrame | frame ) |
Set the reference template from a previous EasyObject coded image, an object selection or a list of known positions.
| positions | The list of positions to be used as template. |
| frame | The frame in which the other arguments are expressed. |
| eVision.EObjectSelection eVision.EObjectTemplateMatcher.GetExtra | ( | eVision.EObjectSelection | selection | ) |
Returns the objects in the selection that do not appear in the template, in the order in which they appear in the selection. EObjectTemplateMatcher.Match must be called before this method.
| selection | The object selection that was used in EObjectTemplateMatcher.Match. |
| eVision.EPoint[] eVision.EObjectTemplateMatcher.GetExtra | ( | eVision.EPoint[] | positions | ) |
Returns the objects in the selection that do not appear in the template, in the order in which they appear in the selection. EObjectTemplateMatcher.Match must be called before this method.
| positions | The vector of positions that was used in EObjectTemplateMatcher.Match. |
| eVision.EObjectSelection eVision.EObjectTemplateMatcher.GetMatched | ( | eVision.EObjectSelection | selection | ) |
Returns the matched objects in the order in which they appear in the template. EObjectTemplateMatcher.Match must be called before this method.
| selection | The object selection that was used in EObjectTemplateMatcher.Match. |
| eVision.EObjectSelection eVision.EObjectTemplateMatcher.GetMatched | ( | eVision.EObjectSelection | selection, |
| bool | fromSelection ) |
Returns the matched objects in the order in which they appear in the template. EObjectTemplateMatcher.Match must be called before this method.
| selection | The object selection that was used in EObjectTemplateMatcher.Match. |
| fromSelection | Wether the given objects are from the selection or the template. Default: selection |
| eVision.EPoint[] eVision.EObjectTemplateMatcher.GetMatched | ( | eVision.EPoint[] | positions | ) |
Returns the matched objects in the order in which they appear in the template. EObjectTemplateMatcher.Match must be called before this method.
| positions | The vector of positions that was used in EObjectTemplateMatcher.Match. |
| eVision.EPoint[] eVision.EObjectTemplateMatcher.GetMatched | ( | eVision.EPoint[] | positions, |
| bool | fromSelection ) |
Returns the matched objects in the order in which they appear in the template. EObjectTemplateMatcher.Match must be called before this method.
| positions | The vector of positions that was used in EObjectTemplateMatcher.Match. |
| fromSelection | Wether the given objects are from the selection or the template. Default: selection |
| eVision.EObjectSelection eVision.EObjectTemplateMatcher.GetMissing | ( | eVision.EObjectSelection | templateSelection | ) |
Returns the template objects that were not matched, in the order in which they appeared in the template. EObjectTemplateMatcher.Match must be called before this method.
| templateSelection | The object selection that was used in EObjectTemplateMatcher.BuildTemplate. |
| eVision.EPoint[] eVision.EObjectTemplateMatcher.GetMissing | ( | eVision.EPoint[] | templatePositions | ) |
Returns the template objects that were not matched, in the order in which they appeared in the template. EObjectTemplateMatcher.Match must be called before this method.
| templatePositions | The vector of positions that was used in EObjectTemplateMatcher.BuildTemplate. |
| void eVision.EObjectTemplateMatcher.GetUnpairedObjects | ( | ref int[] | onlyInTemplate, |
| ref int[] | onlyInSelection ) |
Return lists of object indexes that appear only in template or only in selection.
| onlyInTemplate | The list of object indexes that appear only in the template. |
| onlyInSelection | The list of object indexes that appear only in the selection. |
| void eVision.EObjectTemplateMatcher.Load | ( | eVision.ESerializer | serializer | ) |
Load the EObjectTemplateMatcher configuration. The given ESerializer must have been created for reading.
| serializer | The serializer. |
| void eVision.EObjectTemplateMatcher.Load | ( | string | path | ) |
Load the EObjectTemplateMatcher configuration. The given ESerializer must have been created for reading.
| path | The file path. |
| bool eVision.EObjectTemplateMatcher.Match | ( | eVision.EObjectSelection | selection | ) |
Align and match the given items with the reference template.
The shortest distance between the positions is used to pair the given positions with the template's positions. In the case of EObjectSelection, only the centers of the objects are considered.
After the execution of this function:
Returns true if all given objects and all template objects are matched.
| selection | The object selection to be compared with the template. |
| bool eVision.EObjectTemplateMatcher.Match | ( | eVision.EObjectSelection | selection, |
| eVision.EFrame | frame ) |
Align and match the given items with the reference template.
The shortest distance between the positions is used to pair the given positions with the template's positions. In the case of EObjectSelection, only the centers of the objects are considered.
After the execution of this function:
Returns true if all given objects and all template objects are matched.
| selection | The object selection to be compared with the template. |
| frame | The frame in which the other arguments are expressed. |
| bool eVision.EObjectTemplateMatcher.Match | ( | eVision.EPoint[] | positions | ) |
Align and match the given items with the reference template.
The shortest distance between the positions is used to pair the given positions with the template's positions. In the case of EObjectSelection, only the centers of the objects are considered.
After the execution of this function:
Returns true if all given objects and all template objects are matched.
| positions | The array of positions to be compared with the template. |
| bool eVision.EObjectTemplateMatcher.Match | ( | eVision.EPoint[] | positions, |
| eVision.EFrame | frame ) |
Align and match the given items with the reference template.
The shortest distance between the positions is used to pair the given positions with the template's positions. In the case of EObjectSelection, only the centers of the objects are considered.
After the execution of this function:
Returns true if all given objects and all template objects are matched.
| positions | The array of positions to be compared with the template. |
| frame | The frame in which the other arguments are expressed. |
| void eVision.EObjectTemplateMatcher.Save | ( | eVision.ESerializer | serializer | ) |
Save the EObjectTemplateMatcher configuration. The given ESerializer must have been created for writing.
| serializer | The ESerializer object that is written to. |
| void eVision.EObjectTemplateMatcher.Save | ( | string | path | ) |
Save the EObjectTemplateMatcher configuration. The given ESerializer must have been created for writing.
| path | The file path. |
| void eVision.EObjectTemplateMatcher.SortPositions | ( | eVision.EPoint[] | positions | ) |
Align and match the given position array with the reference template.
The shortest distance between the positions is used to pair the given positions with the template's positions. After the execution of this function, the template indexes corresponding to the position array are returned by method EObjectTemplateMatcher.TemplateIndexes. The position indexes for template's positions are returned by method EObjectTemplateMatcher.SelectionIndexes. Indexes of positions that appears only in template or only in the given array are returned by method EObjectTemplateMatcher.GetUnpairedObjects. The complexity is O(n) where n is the number of elements in the given array.
| positions | The array of positions to be compared with the template. |
Use EObjectTemplateMatcher.Match instead.
Deprecated in version 26.6. Scheduled to be removed in version 27.6.
| void eVision.EObjectTemplateMatcher.SortSelection | ( | eVision.EObjectSelection | selection | ) |
Align and match the given selection with the reference template.
The shortest distance between object's centers is used to pair the objects in the selection with the objects in the template. After the execution of this function, the template indexes corresponding to selection objects are returned by method EObjectTemplateMatcher.TemplateIndexes.
The selection indexes for template objects are returned by method EObjectTemplateMatcher.SelectionIndexes. Indexes of objects that appears only in template or only in selection are returned by method EObjectTemplateMatcher.GetUnpairedObjects. The complexity is O(n) where n is the number of objects in selection.
| selection | The object selection to be compared. The selection is unchanged. |
Use EObjectTemplateMatcher.Match instead.
Deprecated in version 26.6. Scheduled to be removed in version 27.6.
|
getset |
Sets optional preliminary alignement (rigid transformation only: translation and rotation). Choose to enable alignment only if the selection is not aligned with the template. Three types of alignment are possible. See EObjectTemplateMatcherAlignment. The max rotation of the alignment can be set by EObjectTemplateMatcher.MaximumAngle. By default, no alignment is performed.
|
getset |
Enable an optional preliminary global alignement (rigid transformation only: translation and rotation). Enable alignment only if the selection is not aligned with the template.
|
getset |
When EObjectTemplateMatcher.Alignment is set to EObjectTemplateMatcherAlignment.EObjectTemplateMatcherAlignment_Fast or EObjectTemplateMatcherAlignment.EObjectTemplateMatcherAlignment_Robust, the alignment can be constrained to a given angle range. This is useful to filter out symmetries and makes EObjectTemplateMatcherAlignment.EObjectTemplateMatcherAlignment_Robust faster. Defaults to 180°.
|
getset |
Defines the absolute maximum distance (in pixels) for a match to be valid. That value is used during the closest object search. By default, infinite distance is used.
|
get |
Return the number of paired objects.
|
get |
For each object in the TEMPLATE return the paired index in the SELECTION. if the object has no match, the value -1 is used.
|
get |
For each object in the SELECTION return the paired index in the TEMPLATE. If the object has no match, the value -1 is used.