eVision Python API
Loading...
Searching...
No Matches
eVision.Legacy.EPolygonGauge Class Reference

Manages a polygon fitting gauge. More...

Inheritance diagram for eVision.Legacy.EPolygonGauge:
Collaboration diagram for eVision.Legacy.EPolygonGauge:

Public Member Functions

None __init__ (self)
 Constructs a polygon measurement context.
None __init__ (self, eVision.Legacy.EPolygonGauge other)
 Constructs a polygon measurement context.
int AddSkipRange (self, eVision.EIntegerRange range)
 Adds an item to the set of skip ranges and returns the index of the newly added range.
eVision.EIntegerRange GetSkipRange (self, int index)
 Allows to retrieve the start and end values of the skip range corresponding to the given index, if it is valid (i.e.
None RemoveSkipRange (self, int index)
 After a call to eVision.Legacy.EPolygonGauge.AddSkipRange, removes the skip range with the given index.
None RemoveAllSkipRanges (self)
 Removes all the skip ranges previously created by a call to eVision.Legacy.EPolygonGauge.AddSkipRange.
None CopyTo (self, eVision.Legacy.EPolygonGauge other, bool recursive)
 Copies all the data of the current eVision.Legacy.EPolygonGauge object into another eVision.Legacy.EPolygonGauge object, and returns it.
None CopyTo (self, eVision.Legacy.EPolygonGauge other)
 Copies all the data of the current eVision.Legacy.EPolygonGauge object into another eVision.Legacy.EPolygonGauge object, and returns it.
None Process (self, eVision.EROIBW8|None sourceImage, bool daughters)
 Triggers the process pertaining to a shape or gauge and all the daughter gauges attach to it.
None Process (self, eVision.EROIBW8|None sourceImage)
 Triggers the process pertaining to a shape or gauge and all the daughter gauges attach to it.
None Process (self, eVision.EROIBW8|None sourceImage, eVision.ERegion region, bool daughters)
 Triggers the process pertaining to a shape or gauge and all the daughter gauges attach to it.
None Process (self, eVision.EROIBW8|None sourceImage, eVision.ERegion region)
 Triggers the process pertaining to a shape or gauge and all the daughter gauges attach to it.
None Measure (self, eVision.EROIBW8|None sourceImage)
 Triggers the point location or the model fitting operation.
None Measure (self, eVision.EROIBW8|None sourceImage, eVision.ERegion region)
 Triggers the point location or the model fitting operation.
None MeasureSample (self, eVision.EROIBW8|None image, int edgeIndex, int sampleIndex)
 Computes the sample points along the sample path whose index in the list is given by the edgeIndex and sampleIndex parameters.
None MeasureSample (self, eVision.EROIBW8|None image, eVision.ERegion region, int edgeIndex, int sampleIndex)
 Computes the sample points along the sample path whose index in the list is given by the edgeIndex and sampleIndex parameters.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EDrawingMode drawingMode, bool daughters)
 Draws a graphical representation of a point location or model fitting gauge, as defined by eVision.EDrawingMode.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EDrawingMode drawingMode)
 Draws a graphical representation of a point location or model fitting gauge, as defined by eVision.EDrawingMode.
None Draw (self, eVision.EDrawAdapter|None drawAdapter)
 Draws a graphical representation of a point location or model fitting gauge, as defined by eVision.EDrawingMode.
bool HitTest (self, bool daughters)
 Checks whether the cursor is positioned over a handle (true) or not (false).
bool HitTest (self)
 Checks whether the cursor is positioned over a handle (true) or not (false).
None Drag (self, int x, int y)
 Moves a handle to a new position and updates the position parameters of the gauge.
Public Member Functions inherited from eVision.Legacy.EPolygonShape
None __init__ (self)
 Constructs a eVision.Legacy.EPolygonShape.
None __init__ (self, eVision.Legacy.EPolygonShape other)
 Constructs a eVision.Legacy.EPolygonShape.
None __init__ (self, list[eVision._eVision.EPoint] vertices, bool closed)
 Constructs a eVision.Legacy.EPolygonShape.
None __init__ (self, list[eVision._eVision.EPoint] vertices)
 Constructs a eVision.Legacy.EPolygonShape.
None AddVertexAtDisplayPosition (self, int x, int y)
 Add a vertex to the polygon at a position depending on a display coordinate.
None RemoveVertexAtDisplayPosition (self, int x, int y)
 Remove the closest vertex to the display position (x,y).
None SetCenterXY (self, float centerX, float centerY)
 Sets the center coordinates of a eVision.Legacy.EPolygonShape object.
eVision.EPoint GetVertex (self, int index)
 Gets a polygon vertex.
None SetVertex (self, int index, eVision.EPoint pt)
 Sets a polygon vertex.
None AppendVertex (self, eVision.EPoint pt)
 Append a polygon vertex after the last.
None Closest (self)
 Find the daughter shape that is the closest to this shape.
Public Member Functions inherited from eVision.Legacy.EShape
eVision.Legacy.EShape|None GetShapeNamed (self, str name)
 Returns a pointer to a daughter gauge or shape specified by its name.
bool GetFound (self)
 Flag indicating whether a measured shape has been found.
bool GetAutoArrange (self)
None SetAutoArrange (self, bool bAutoArrange, bool bDaughters)
None SetAutoArrange (self, bool bAutoArrange)
None SetFound (self, bool bFound, bool bDaughters)
None SetFound (self, bool bFound)
bool GetInspected (self)
None SetInspected (self, bool bFound, bool bDaughters)
None SetInspected (self, bool bFound)
bool GetPassed (self)
None SetPassed (self, bool bFound, bool bDaughters)
None SetPassed (self, bool bFound)
bool GetQuickDraw (self)
None SetQuickDraw (self, bool bFound, bool bDaughters)
None SetQuickDraw (self, bool bFound)
bool GetOptionalDraw (self)
None SetOptionalDraw (self, bool bFound, bool bDaughters)
None SetOptionalDraw (self, bool bFound)
bool GetUserFlag (self)
None SetUserFlag (self, bool bUserFlag, bool bDaughters)
None SetUserFlag (self, bool bUserFlag)
bool GetAllocated (self)
 Gets the allocated flag.
None EnableBehaviorFilter (self, eVision.EShapeBehavior behavior, bool value)
 Modifies the so-called behavior filter that is a conjunction of conditions specifying when a shape or a gauge should be displayed or taken into consideration when monitoring the mouse interactions.
None EnableBehaviorFilter (self, eVision.EShapeBehavior behavior)
 Modifies the so-called behavior filter that is a conjunction of conditions specifying when a shape or a gauge should be displayed or taken into consideration when monitoring the mouse interactions.
None DisableBehaviorFilter (self, eVision.EShapeBehavior behavior)
 Disables (i.e.
None Attach (self, eVision.Legacy.EShape|None mother)
 Attaches the gauge to a mother gauge or shape.
None Detach (self)
 Detaches the gauge from its mother gauge or shape.
None DetachDaughters (self)
 Detaches the daughter gauges or shapes.
eVision.Legacy.EShape|None GetDaughter (self, int index)
 Returns a pointer to the specified daughter gauge or shape.
bool IsWorld (self)
None InvalidateWorld (self)
 Invalidates the world shape for this shape and all its ancestors.
eVision.EPoint LocalToSensor (self, eVision.EPoint LPoint)
 Transforms a point from local coordinates to sensor coordinates.
eVision.EPoint SensorToLocal (self, eVision.EPoint SPoint)
 Transforms a point from sensor coordinates to local coordinates.
None SetZoom (self, float zoomX, float zoomY)
 Sets the horizontal and vertical zooming factors for drawing operations.
None SetZoom (self, float zoomX)
 Sets the horizontal and vertical zooming factors for drawing operations.
None SetZoom (self)
 Sets the horizontal and vertical zooming factors for drawing operations.
None SetPan (self, float panX, float panY)
 Sets the horizontal and vertical panning values for drawing operations, expressed in pixels.
None SetPan (self, float panX)
 Sets the horizontal and vertical panning values for drawing operations, expressed in pixels.
None SetPan (self)
 Sets the horizontal and vertical panning values for drawing operations, expressed in pixels.
None SetDraggingMode (self, eVision.EDraggingMode eDraggingMode, bool bDaughters)
 Sets the dragging mode which defines how the shape could be dragged.
None SetDraggingMode (self, eVision.EDraggingMode eDraggingMode)
 Sets the dragging mode which defines how the shape could be dragged.
eVision.EDraggingMode GetDraggingMode (self)
 Gets the dragging mode which defines how the shape could be dragged.
None SetCursor (self, int x, int y)
 Sets the cursor current coordinates.
None Save (self, str path, bool daughters)
 Loads a Shape.The given eVision.ESerializer must have been created for writing.
None Save (self, str path)
 Loads a Shape.The given eVision.ESerializer must have been created for writing.
None Save (self, eVision.ESerializer|None serializer, bool daughters)
 Loads a Shape.The given eVision.ESerializer must have been created for writing.
None Save (self, eVision.ESerializer|None serializer)
 Loads a Shape.The given eVision.ESerializer must have been created for writing.
None Load (self, str path, bool daughters)
 Loads a Shape.The given eVision.ESerializer must have been created for reading.
None Load (self, str path)
 Loads a Shape.The given eVision.ESerializer must have been created for reading.
None Load (self, eVision.ESerializer|None serializer, bool daughters)
 Loads a Shape.The given eVision.ESerializer must have been created for reading.
None Load (self, eVision.ESerializer|None serializer)
 Loads a Shape.The given eVision.ESerializer must have been created for reading.
bool HasProperty (self, str aProperty)
 Returns whether a eVision.Legacy.EShape has a property named aProperty.
str GetProperty (self, str aProperty)
 Gets the value of property aProperty.
None SetProperty (self, str aProperty, str aValue)
 Sets the value of property aProperty to aValue for this eVision.Legacy.EShape.
None SetPropertyRecursive (self, str aProperty, str aValue)
 Sets the value of property aProperty to aValue for this eVision.Legacy.EShape and all of its daughters.
None RemoveProperty (self, str aProperty)
 Removes the property name aProperty from the eVision.Legacy.EShape.
bool HasValidPolarityProperty (self)
 Returns whether the eVision.Legacy.EShape has a valid polarity property.
None EnableTypeFilter (self, int un32Types)
 Enables the filter of the specified shape type.
None DisableTypeFilter (self)
 Enables all shape types.

Properties

 FilteringThreshold = property(_FilteringThreshold__getter, _FilteringThreshold__setter)
 Relative filtering threshold, that is the fraction of the average distance between the sampled points and the fitted model above which a point is filtered out.
 NumFilteringPasses = property(_NumFilteringPasses__getter, _NumFilteringPasses__setter)
 Number of filtering passes for a model fitting operation.
 NumFilteringPassesInt = property(_NumFilteringPassesInt__getter, _NumFilteringPassesInt__setter)
 NumValidSamples = property(_NumValidSamples__getter, None)
 Number of valid sample points remaining after a model fitting operation.
 AverageDistance = property(_AverageDistance__getter, None)
 Average distance between the sampled points and the fitted model.
 MinNumFitSamples = property(_MinNumFitSamples__getter, _MinNumFitSamples__setter)
 Returns the minimum number of samples required for fitting on each edges of the polygon.
 NumSkipRanges = property(_NumSkipRanges__getter, None)
 Number of skip ranges in the gauge after a call to eVision.Legacy.EPolygonGauge.AddSkipRange.
 Type = property(_Type__getter, None)
 Shape type.
 Shape = property(_Shape__getter, None)
 Active = property(_Active__getter, _Active__setter)
 Sets the flag indicating whether the gauge is active or not.
 Tolerance = property(_Tolerance__getter, _Tolerance__setter)
 Searching area half thickness of the polygon fitting gauge.
 HVConstraint = property(_HVConstraint__getter, _HVConstraint__setter)
 Status of the restriction on the orientation of the point location gauge or model fitting sample paths.
 TransitionType = property(_TransitionType__getter, _TransitionType__setter)
 Transition type.
 TransitionChoice = property(_TransitionChoice__getter, _TransitionChoice__setter)
 Transition choice.
 TransitionIndex = property(_TransitionIndex__getter, _TransitionIndex__setter)
 Index (from 0 on) of the transition to be retained when the transition choice parameter is set to eVision.ETransitionChoice.NthFromBegin or eVision.ETransitionChoice.NthFromEnd.
 Threshold = property(_Threshold__getter, _Threshold__setter)
 Threshold level used to delimit significant peaks in the data profile.
 MinAmplitude = property(_MinAmplitude__getter, _MinAmplitude__setter)
 Offset added to the Threshold when a peak is to be detected.
 MinArea = property(_MinArea__getter, _MinArea__setter)
 Minimum area value.
 Thickness = property(_Thickness__getter, _Thickness__setter)
 Number of parallel segments used to extract the data profile.
 Smoothing = property(_Smoothing__getter, _Smoothing__setter)
 Number of pixels used for the low-pass filtering operation.
 SamplingStep = property(_SamplingStep__getter, _SamplingStep__setter)
 Approximate distance between sampled points during a model fitting operation.
 NumSamples = property(_NumSamples__getter, None)
 Number of sampled points during the model fitting operation.
 MeasurementMode = property(_MeasurementMode__getter, _MeasurementMode__setter)
 The polygon gauge measurement mode, in eVision.Legacy.EPolygonMeasurementMode.
 EnableScaling = property(_EnableScaling__getter, _EnableScaling__setter)
 When using the eVision.Legacy.EPolygonMeasurementMode.Global mode, if eVision.Legacy.EPolygonGauge.EnableScaling is enable then the best scale is evaluated.
 MeasuredPolygon = property(_MeasuredPolygon__getter, None)
 Returns the measured polygon (if found) or the nominal polygon otherwise.
Properties inherited from eVision.Legacy.EPolygonShape
 Center = property(_Center__getter, _Center__setter)
 Center point of the shape.
 CenterX = property(_CenterX__getter, None)
 Abscissa of the origin point of the shape.
 CenterY = property(_CenterY__getter, None)
 Ordinate of the origin point of the shape.
 Angle = property(_Angle__getter, _Angle__setter)
 Orientation of the shape.
 Scale = property(_Scale__getter, _Scale__setter)
 Scale of the polygon.
 Length = property(_Length__getter, None)
 Returns the length (perimeter) of the polygon.
 IsClosed = property(_IsClosed__getter, _IsClosed__setter)
 The polygon close attribute.
 Polygon = property(_Polygon__getter, _Polygon__setter)
 Sets/Gets the polygon according to a known eVision.Legacy.EPolygon object.
 NumVertices = property(_NumVertices__getter, None)
 Returns the number of polygon's vertices.
 NumEdges = property(_NumEdges__getter, None)
 Returns the number of polygon's edges (or sides).
 Type = property(_Type__getter, None)
 Shape type.
Properties inherited from eVision.Legacy.EShape
 Type = property(_Type__getter, None)
 Shape type.
 Name = property(_Name__getter, _Name__setter)
 Name of the eVision.Legacy.EShape object.
 Visible = property(_Visible__getter, _Visible__setter)
 Flag indicating whether the shape is visible or not.
 VisibleRecursive = property(None, _VisibleRecursive__setter)
 Sets the flag indicating whether the shape and its daughter shapes are visible or not.
 Selected = property(_Selected__getter, _Selected__setter)
 Flag indicating whether the shape is selected or not.
 SelectedRecursive = property(None, _SelectedRecursive__setter)
 Sets the flag indicating whether the shape and all its daughters are selected or not.
 Selectable = property(_Selectable__getter, _Selectable__setter)
 Flag indicating whether the shape can be selected or not.
 SelectableRecursive = property(None, _SelectableRecursive__setter)
 Sets the flag indicating whether the shape and all its daughters can be selected or not.
 Dragable = property(_Dragable__getter, _Dragable__setter)
 Flag indicating whether the shape can be dragged or not.
 DragableRecursive = property(None, _DragableRecursive__setter)
 Sets the flag indicating whether the shape and all its daughters can be dragged or not.
 Resizable = property(_Resizable__getter, _Resizable__setter)
 Flag indicating whether the shape can be resized or not.
 ResizableRecursive = property(None, _ResizableRecursive__setter)
 Sets the flag indicating whether the shape and all its daughters can be resized or not.
 Rotatable = property(_Rotatable__getter, _Rotatable__setter)
 Flag indicating whether the shape can be rotated or not.
 RotatableRecursive = property(None, _RotatableRecursive__setter)
 Sets the flag indicating whether the shape and all its daughters can be rotated or not.
 Labeled = property(_Labeled__getter, _Labeled__setter)
 Flag indicating whether the shape label should be displayed or not.
 LabeledRecursive = property(None, _LabeledRecursive__setter)
 Sets the flag indicating whether the shape label should be displayed or not.
 Active = property(_Active__getter, _Active__setter)
 Flag indicating whether the shape is active or not.
 ActiveRecursive = property(None, _ActiveRecursive__setter)
 Sets the flag indicating whether the shape and all its daughters are active or not.
 ActualShape = property(_ActualShape__getter, _ActualShape__setter)
 Flag indicating whether an inquiry returns a result pertaining to the nominal gauge (false, default) or the fitted model (true).
 ActualShapeRecursive = property(None, _ActualShapeRecursive__setter)
 Sets the flag indicating whether an inquiry returns a result pertaining to the nominal gauge (false, default) or the fitted model (true).
 NumDaughters = property(_NumDaughters__getter, None)
 Number of daughters attached to the shape.
 Mother = property(_Mother__getter, None)
 Pointer to the mother shape.
 WorldShape = property(_WorldShape__getter, None)
 World ancestor.
 ZoomX = property(_ZoomX__getter, None)
 Current horizontal zooming factor for drawing operations.
 ZoomY = property(_ZoomY__getter, None)
 Current vertical zooming factor for drawing operations.
 PanX = property(_PanX__getter, None)
 Current horizontal panning value for drawing operations, expressed in pixels.
 PanY = property(_PanY__getter, None)
 Current vertical panning value for drawing operations, expressed in pixels.
 HitHandle = property(_HitHandle__getter, None)
 Handle currently under the cursor.
 HitShape = property(_HitShape__getter, None)
 Pointer to the shape currently under the cursor.
 ClosestShape = property(_ClosestShape__getter, None)
 Closest shape among the daughters.

Detailed Description

Manages a polygon fitting gauge.

Remarks:

License(s): EasyGauge

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.Legacy.EPolygonGauge.__init__ ( self)

Constructs a polygon measurement context.

Remarks:

With the default constructor, all the parameters are initialized to their respective default values.

With the copy constructor, the constructed polygon measurement context is based on a pre-existing eVision.Legacy.EPolygonGauge object. The gauge children are also copied. Hierarchy copying through a copy constructor is always recursive. To disable this recursion, use instead the eVision.Legacy.EPolygonGauge.CopyTo method.

◆ __init__() [2/2]

None eVision.Legacy.EPolygonGauge.__init__ ( self,
eVision.Legacy.EPolygonGauge other )

Constructs a polygon measurement context.

Remarks:

With the default constructor, all the parameters are initialized to their respective default values.

With the copy constructor, the constructed polygon measurement context is based on a pre-existing eVision.Legacy.EPolygonGauge object. The gauge children are also copied. Hierarchy copying through a copy constructor is always recursive. To disable this recursion, use instead the eVision.Legacy.EPolygonGauge.CopyTo method.

Parameters
otherAnother eVision.Legacy.EPolygonGauge object to be copied in the new eVision.Legacy.EPolygonGauge object.

Member Function Documentation

◆ AddSkipRange()

int eVision.Legacy.EPolygonGauge.AddSkipRange ( self,
eVision.EIntegerRange range )

Adds an item to the set of skip ranges and returns the index of the newly added range.

Remarks:

The samples indices between start and end (including the boundaries) will be discarded during the measurement process.

This method allows to define skip ranges in an eVision.Legacy.EPolygonGauge. This means that, at measure time, samples belonging to these ranges will not be taken into account.

A sample may belong to more than one skip range; to be discarded, a sample has to pertain to at least one range. Moreover, the skip ranges are allowed to overlap one another.

The range is allowed to be reversed (i.e. end is not required to be greater than start).

Also, start and end are not required to reference valid indices at the time of the call (i.e. the range may lie outside of the current return value for eVision.Legacy.EPolygonGauge.NumSamples).

Parameters
rangeThe skip range.

◆ CopyTo() [1/2]

None eVision.Legacy.EPolygonGauge.CopyTo ( self,
eVision.Legacy.EPolygonGauge other )

Copies all the data of the current eVision.Legacy.EPolygonGauge object into another eVision.Legacy.EPolygonGauge object, and returns it.

Remarks:

In the overload taking a pointer, in case of a NULL pointer, a new eVision.Legacy.EPolygonGauge object will be created and returned.

Parameters
otherPointer to the eVision.Legacy.EPolygonGauge object in which the current eVision.Legacy.EPolygonGauge object data have to be copied.

Reimplemented from eVision.Legacy.EPolygonShape.

◆ CopyTo() [2/2]

None eVision.Legacy.EPolygonGauge.CopyTo ( self,
eVision.Legacy.EPolygonGauge other,
bool recursive )

Copies all the data of the current eVision.Legacy.EPolygonGauge object into another eVision.Legacy.EPolygonGauge object, and returns it.

Remarks:

In the overload taking a pointer, in case of a NULL pointer, a new eVision.Legacy.EPolygonGauge object will be created and returned.

Parameters
otherPointer to the eVision.Legacy.EPolygonGauge object in which the current eVision.Legacy.EPolygonGauge object data have to be copied.
recursivetrue if the children gauges have to be copied as well, false otherwise.

Reimplemented from eVision.Legacy.EPolygonShape.

◆ Drag()

None eVision.Legacy.EPolygonGauge.Drag ( self,
int x,
int y )

Moves a handle to a new position and updates the position parameters of the gauge.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.

Reimplemented from eVision.Legacy.EPolygonShape.

◆ Draw() [1/3]

None eVision.Legacy.EPolygonGauge.Draw ( self,
eVision.EDrawAdapter | None drawAdapter )

Draws a graphical representation of a point location or model fitting gauge, as defined by eVision.EDrawingMode.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).

Reimplemented from eVision.Legacy.EPolygonShape.

◆ Draw() [2/3]

None eVision.Legacy.EPolygonGauge.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
eVision.EDrawingMode drawingMode )

Draws a graphical representation of a point location or model fitting gauge, as defined by eVision.EDrawingMode.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by eVision.EDrawingMode.

Reimplemented from eVision.Legacy.EPolygonShape.

◆ Draw() [3/3]

None eVision.Legacy.EPolygonGauge.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
eVision.EDrawingMode drawingMode,
bool daughters )

Draws a graphical representation of a point location or model fitting gauge, as defined by eVision.EDrawingMode.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by eVision.EDrawingMode.
daughterstrue if the daughters gauges are to be displayed also.

Reimplemented from eVision.Legacy.EPolygonShape.

◆ GetSkipRange()

eVision.EIntegerRange eVision.Legacy.EPolygonGauge.GetSkipRange ( self,
int index )

Allows to retrieve the start and end values of the skip range corresponding to the given index, if it is valid (i.e.

if it has previously been created by a call to the eVision.Legacy.EPolygonGauge.AddSkipRange method.

Remarks:

Start is guaranteed to be smaller or equal to end.

Parameters
indexIndex of the skip range.

◆ HitTest() [1/2]

bool eVision.Legacy.EPolygonGauge.HitTest ( self)

Checks whether the cursor is positioned over a handle (true) or not (false).

Reimplemented from eVision.Legacy.EPolygonShape.

◆ HitTest() [2/2]

bool eVision.Legacy.EPolygonGauge.HitTest ( self,
bool daughters )

Checks whether the cursor is positioned over a handle (true) or not (false).

Parameters
daughterstrue if the daughters gauges handles have to be considered as well.

Reimplemented from eVision.Legacy.EPolygonShape.

◆ Measure() [1/2]

None eVision.Legacy.EPolygonGauge.Measure ( self,
eVision.EROIBW8 | None sourceImage )

Triggers the point location or the model fitting operation.

Remarks:

When this method is called, and if not enough valid points are detected, then the method returns directly, and the measured gauge is set to the nominal parameters.

Parameters
sourceImagePointer to the source image.

◆ Measure() [2/2]

None eVision.Legacy.EPolygonGauge.Measure ( self,
eVision.EROIBW8 | None sourceImage,
eVision.ERegion region )

Triggers the point location or the model fitting operation.

Remarks:

When this method is called, and if not enough valid points are detected, then the method returns directly, and the measured gauge is set to the nominal parameters.

Parameters
sourceImagePointer to the source image.
regionRegion to use with the source image.

◆ MeasureSample() [1/2]

None eVision.Legacy.EPolygonGauge.MeasureSample ( self,
eVision.EROIBW8 | None image,
eVision.ERegion region,
int edgeIndex,
int sampleIndex )

Computes the sample points along the sample path whose index in the list is given by the edgeIndex and sampleIndex parameters.

Remarks:

This method stores its results into a temporary variable inside the eVision.Legacy.EPolygonGauge object.

Parameters
imagePointer to the source image/ROI.
regionRegion on which to measure.
edgeIndexIndex of the edge to inspect within the edges of the polygon.
sampleIndexIndex of the sample to inspect within the selected edge.

◆ MeasureSample() [2/2]

None eVision.Legacy.EPolygonGauge.MeasureSample ( self,
eVision.EROIBW8 | None image,
int edgeIndex,
int sampleIndex )

Computes the sample points along the sample path whose index in the list is given by the edgeIndex and sampleIndex parameters.

Remarks:

This method stores its results into a temporary variable inside the eVision.Legacy.EPolygonGauge object.

Parameters
imagePointer to the source image/ROI.
edgeIndexIndex of the edge to inspect within the edges of the polygon.
sampleIndexIndex of the sample to inspect within the selected edge.

◆ Process() [1/4]

None eVision.Legacy.EPolygonGauge.Process ( self,
eVision.EROIBW8 | None sourceImage )

Triggers the process pertaining to a shape or gauge and all the daughter gauges attach to it.

Remarks:

When complex gauging is required, several gauges can be grouped together. Applying Process to the mother gauge or shape triggers the measurement of the whole. Only the active gauges will participate in the process.

Parameters
sourceImagePointer to the source image.

Reimplemented from eVision.Legacy.EShape.

◆ Process() [2/4]

None eVision.Legacy.EPolygonGauge.Process ( self,
eVision.EROIBW8 | None sourceImage,
bool daughters )

Triggers the process pertaining to a shape or gauge and all the daughter gauges attach to it.

Remarks:

When complex gauging is required, several gauges can be grouped together. Applying Process to the mother gauge or shape triggers the measurement of the whole. Only the active gauges will participate in the process.

Parameters
sourceImagePointer to the source image.
daughtersFlag indicating whether the daughters shapes inherit of the same behavior.

Reimplemented from eVision.Legacy.EShape.

◆ Process() [3/4]

None eVision.Legacy.EPolygonGauge.Process ( self,
eVision.EROIBW8 | None sourceImage,
eVision.ERegion region )

Triggers the process pertaining to a shape or gauge and all the daughter gauges attach to it.

Remarks:

When complex gauging is required, several gauges can be grouped together. Applying Process to the mother gauge or shape triggers the measurement of the whole. Only the active gauges will participate in the process.

Parameters
sourceImagePointer to the source image.
regionRegion to use with the source image.

Reimplemented from eVision.Legacy.EShape.

◆ Process() [4/4]

None eVision.Legacy.EPolygonGauge.Process ( self,
eVision.EROIBW8 | None sourceImage,
eVision.ERegion region,
bool daughters )

Triggers the process pertaining to a shape or gauge and all the daughter gauges attach to it.

Remarks:

When complex gauging is required, several gauges can be grouped together. Applying Process to the mother gauge or shape triggers the measurement of the whole. Only the active gauges will participate in the process.

Parameters
sourceImagePointer to the source image.
regionRegion to use with the source image.
daughtersFlag indicating whether the daughters shapes inherit of the same behavior.

Reimplemented from eVision.Legacy.EShape.

◆ RemoveAllSkipRanges()

None eVision.Legacy.EPolygonGauge.RemoveAllSkipRanges ( self)

Removes all the skip ranges previously created by a call to eVision.Legacy.EPolygonGauge.AddSkipRange.

◆ RemoveSkipRange()

None eVision.Legacy.EPolygonGauge.RemoveSkipRange ( self,
int index )

After a call to eVision.Legacy.EPolygonGauge.AddSkipRange, removes the skip range with the given index.

Parameters
indexIndex of the skip range to remove, as returned by eVision.Legacy.EPolygonGauge.AddSkipRange.

Property Documentation

◆ Active

eVision.Legacy.EPolygonGauge.Active = property(_Active__getter, _Active__setter)
static

Sets the flag indicating whether the gauge is active or not.

Remarks:

When complex gauging is required, several gauges can be grouped together. Applying eVision.Legacy.EPolygonGauge.Process to the mother gauge or shape triggers the measurement of the whole. Only the active gauges will participate in the process. By default, the gauge is active (true).

◆ AverageDistance

eVision.Legacy.EPolygonGauge.AverageDistance = property(_AverageDistance__getter, None)
static

Average distance between the sampled points and the fitted model.

Remarks:

Irrelevant in case of a point location operation.

◆ EnableScaling

eVision.Legacy.EPolygonGauge.EnableScaling = property(_EnableScaling__getter, _EnableScaling__setter)
static

When using the eVision.Legacy.EPolygonMeasurementMode.Global mode, if eVision.Legacy.EPolygonGauge.EnableScaling is enable then the best scale is evaluated.

◆ FilteringThreshold

eVision.Legacy.EPolygonGauge.FilteringThreshold = property(_FilteringThreshold__getter, _FilteringThreshold__setter)
static

Relative filtering threshold, that is the fraction of the average distance between the sampled points and the fitted model above which a point is filtered out.

Remarks:

Irrelevant in case of a point location operation.

During a model fitting operation, the "filtering" process can be invoked to remove outliers, i.e. points that were located significantly far away from the fitted model (so that their position is dubious).

◆ HVConstraint

eVision.Legacy.EPolygonGauge.HVConstraint = property(_HVConstraint__getter, _HVConstraint__setter)
static

Status of the restriction on the orientation of the point location gauge or model fitting sample paths.

Remarks:

Sample paths are the point location gauges placed along the model to be fitted.

◆ MeasuredPolygon

eVision.Legacy.EPolygonGauge.MeasuredPolygon = property(_MeasuredPolygon__getter, None)
static

Returns the measured polygon (if found) or the nominal polygon otherwise.

Remarks:

Use method eVision.Legacy.EShape.GetFound to get the status of the measurement. eVision.Legacy.EPolygonGauge.MeasuredPolygon returns a successful fitted polygon if eVision.Legacy.EShape.GetFound is true, otherwise it returns the orginal (nominal) polygon.

◆ MeasurementMode

eVision.Legacy.EPolygonGauge.MeasurementMode = property(_MeasurementMode__getter, _MeasurementMode__setter)
static

The polygon gauge measurement mode, in eVision.Legacy.EPolygonMeasurementMode.

The default mode is eVision.Legacy.EPolygonMeasurementMode.Global.

◆ MinAmplitude

eVision.Legacy.EPolygonGauge.MinAmplitude = property(_MinAmplitude__getter, _MinAmplitude__setter)
static

Offset added to the Threshold when a peak is to be detected.

Remarks:

When analyzing a derivative profile, a peak is made up of consecutive pixel values above Threshold. To detect weak [strong] transitions, lower [raise] the Threshold value.

To avoid interference of noise, an additional parameter is provided. The MinAmplitude parameter is an offset added to Threshold when a peak is to be detected.

When the pixel values of the derivative profile do not reach Threshold + MinAmplitude, the peak is not taken into account. Anyway, when a peak is taken into account, all the pixels with values above Threshold are considered (for more accuracy). Setting the MinAmplitude value to 0 merely cancels its effect.

◆ MinArea

eVision.Legacy.EPolygonGauge.MinArea = property(_MinArea__getter, _MinArea__setter)
static

Minimum area value.

Remarks:

A transition is detected if its derivative peak reaches Threshold + MinAmplitude value, and then declared valid if the area between the peak curve and the horizontal at level Threshold reaches the MinArea value.

◆ MinNumFitSamples

eVision.Legacy.EPolygonGauge.MinNumFitSamples = property(_MinNumFitSamples__getter, _MinNumFitSamples__setter)
static

Returns the minimum number of samples required for fitting on each edges of the polygon.

◆ NumFilteringPasses

eVision.Legacy.EPolygonGauge.NumFilteringPasses = property(_NumFilteringPasses__getter, _NumFilteringPasses__setter)
static

Number of filtering passes for a model fitting operation.

Remarks:

Irrelevant in case of a point location operation.

During a filtering pass, the points that are too distant from the model are discarded.

During a model fitting operation, the "filtering" process can be invoked to remove outliers, i.e. points that were located significantly far away from the fitted model (so that their position is dubious).

By default (the number of filtering passes is 0), the outliers rejection process is disabled.

◆ NumFilteringPassesInt

eVision.Legacy.EPolygonGauge.NumFilteringPassesInt = property(_NumFilteringPassesInt__getter, _NumFilteringPassesInt__setter)
static

◆ NumSamples

eVision.Legacy.EPolygonGauge.NumSamples = property(_NumSamples__getter, None)
static

Number of sampled points during the model fitting operation.

The samples are distributed evenly on the polygon.

Remarks:

After a model fitting operation, a number of points have been fitted along the model. Among them, some are not reliable because of their Area value. Among the remaining ones, some are filtered out (NumFilteringPasses, FilteringThreshold).

◆ NumSkipRanges

eVision.Legacy.EPolygonGauge.NumSkipRanges = property(_NumSkipRanges__getter, None)
static

Number of skip ranges in the gauge after a call to eVision.Legacy.EPolygonGauge.AddSkipRange.

◆ NumValidSamples

eVision.Legacy.EPolygonGauge.NumValidSamples = property(_NumValidSamples__getter, None)
static

Number of valid sample points remaining after a model fitting operation.

Remarks:

Irrelevant in case of a point location operation.

After a model fitting operation, a number of points have been fitted along the model. Among them, some are not reliable because of their Area value. Among the remaining ones, some are filtered out (NumFilteringPasses, FilteringThreshold).

◆ SamplingStep

eVision.Legacy.EPolygonGauge.SamplingStep = property(_SamplingStep__getter, _SamplingStep__setter)
static

Approximate distance between sampled points during a model fitting operation.

Remarks:

Irrelevant in case of a point location operation.

To fit a model, a series of point location operations are performed along the model. The point location gauges spacing is given by the sampling step.

By default, the sampling step is set to 5, which means 5 pixels when the field of view is not calibrated, and 5 physical units in case of a calibrated field of view.

Be aware that if the sampling step is too large, the number of sampled points along the model will not be sufficient enough to accurately locate it.

◆ Shape

eVision.Legacy.EPolygonGauge.Shape = property(_Shape__getter, None)
static

◆ Smoothing

eVision.Legacy.EPolygonGauge.Smoothing = property(_Smoothing__getter, _Smoothing__setter)
static

Number of pixels used for the low-pass filtering operation.

Remarks:

To reduce the effect of noise, the profile data can be low-pass filtered along the point location gauge direction.

◆ Thickness

eVision.Legacy.EPolygonGauge.Thickness = property(_Thickness__getter, _Thickness__setter)
static

Number of parallel segments used to extract the data profile.

Remarks:

To reduce the effect of noise and/or strengthen a transition, several parallel profiles can be accumulated.

◆ Threshold

eVision.Legacy.EPolygonGauge.Threshold = property(_Threshold__getter, _Threshold__setter)
static

Threshold level used to delimit significant peaks in the data profile.

Remarks:

When analyzing a derivative profile, a peak is made up of consecutive pixel values above Threshold. To detect weak [strong] transitions, lower [raise] the Threshold value.

To avoid interference of noise, an additional parameter is provided. The MinAmplitude parameter is an offset added to Threshold when a peak is to be detected.

When the pixel values of the derivative profile do not reach Threshold + MinAmplitude, the peak is not taken into account. Anyway, when a peak is taken into account, all the pixels with values above Threshold are considered (for more accuracy). Setting the MinAmplitude value to 0 merely cancels its effect.

◆ Tolerance

eVision.Legacy.EPolygonGauge.Tolerance = property(_Tolerance__getter, _Tolerance__setter)
static

Searching area half thickness of the polygon fitting gauge.

Remarks:

A polygon fitting gauge is fully defined knowing its nominal positions (vertices), its nominal origin, angle and scale, and its outline tolerance.

By default, the searching area thickness of the polygon fitting gauge is 20 (2x10), which means 20 pixels when the field of view is not calibrated, and 20 physical units in case of a calibrated field of view.

◆ TransitionChoice

eVision.Legacy.EPolygonGauge.TransitionChoice = property(_TransitionChoice__getter, _TransitionChoice__setter)
static

Transition choice.

Remarks:

Several peaks may be detected along a point location gauge. This parameter helps to select the desired transition.

In case of eVision.ETransitionChoice.NthFromBegin or eVision.ETransitionChoice.NthFromEnd transition choice, set eVision.Legacy.EPolygonGauge.TransitionIndex to specify the desired transition.

By default, the selected transition corresponds to the one with the largest amplitude (eVision.ETransitionChoice.LargestAmplitude).

◆ TransitionIndex

eVision.Legacy.EPolygonGauge.TransitionIndex = property(_TransitionIndex__getter, _TransitionIndex__setter)
static

Index (from 0 on) of the transition to be retained when the transition choice parameter is set to eVision.ETransitionChoice.NthFromBegin or eVision.ETransitionChoice.NthFromEnd.

Remarks:

Several peaks may be detected along a point location gauge. This parameter helps to select the desired transition.

By default, the first transition is retained (the index value is 0).

◆ TransitionType

eVision.Legacy.EPolygonGauge.TransitionType = property(_TransitionType__getter, _TransitionType__setter)
static

Transition type.

Remarks:

The type of a transition tells whether it crosses increasing or decreasing gray-level values. This helps discriminate between nearby edges of an object.

By default, the searched transition type is indifferently a black to white or a white to black transition (eVision.ETransitionType.BwOrWb).

◆ Type

eVision.Legacy.EPolygonGauge.Type = property(_Type__getter, None)
static

Shape type.