Gauge Types¶
Point Gauge¶
Description: the point gauge finds points along a line probe segment that crosses the edges as specified by the measurement parameters.
Nominal shape: a line segment (
ELine.NET Python).Use
EPointGauge::GetNominalLine.NET Python to set the nominal line .
Measured shape: a point set (
EPointSet.NET Python).Use
EPointGauge::GetMeasuredPointSet.NET Python to get the measured set of points.Use
EPointSet::GetPoint.NET Python to get a measured point.Use
EPointSet::GetPoints.NET Python to get all the points.
Example of point gauges. On the left, both black to white and white to black transitions are detected. On the right, only black to white transitions are detected.¶
Line Gauge¶
Description: the line gauge finds a line segment that follows an edge as specified by the measurement parameters.
Nominal shape: a line segment (
ELine.NET Python).Use
ELineGauge::GetNominal.NET Python to set the nominal line.
Measured shape: a line segment (
ELine.NET Python)Use
ELineGauge::GetMeasuredLine.NET Python to get the measured line.
Specific parameters:
Set
ELineGauge::GetKnownAngle.NET Python totrueto fix the slope of the line.
Example of a line gauge.¶
Rectangle Gauge¶
Description: the rectangle gauge finds a rectangle that fits edges of the image as specified by the measurement parameters.
Nominal shape: a rectangle (
ERectangle.NET Python).Use
ERectangleGauge::GetNominal.NET Python to set the nominal rectangle .
Measured shape: a rectangle (
ERectangle.NET Python).Use
ERectangleGauge::GetMeasuredRectangle.NET Python to get the measured rectangle.
Specific parameters:
Use
ERectangleGauge::GetActiveEdges.NET Python to set the edge to fit to the image.The active edges of the rectangles are a combination of the value of the enumerate
ERectangleGaugeEdge.NET Python (Left,Right,Bottom,Top).Set
ERectangleGauge::GetKnownAngle.NET Python totrueto fix the orientation of the rectangle.
Example of a rectangle gauge.¶
Circle Gauge¶
Description: the circle gauge finds a circle that fits edges of the image as specified by the measurement parameters.
Nominal shape: a circle (
ECircle.NET Python)Use
ECircleGauge::GetNominal.NET Python to set the nominal line.
Measured shape: a circle (
ECircle.NET Python)Use
ECircleGauge::GetMeasuredCircle.NET Python to get the measured circle.
Example of a circle gauge.¶
Wedge Gauge¶
Description: the wedge gauge finds a wedge that fits edges of the image as specified by the measurement parameters.
Nominal shape: a wedge (
EWedge.NET Python)Use
EWedgeGauge::GetNominal.NET Python to set the nominal wedge.
Measured shape: a wedge (
EWedge.NET Python)Use
EWedgeGauge::GetMeasuredWedge.NET Python to get the measured wedge.
Specific parameters:
Use
EWedgeGauge::GetActiveEdges.NET Python to set the edge to fit to the image.The active edges of the wedge are a combination of the value of the enumerate
EWedgeGaugeEdge.NET Python:EWedgeGaugeEdge_Inner: inner circle edge.EWedgeGaugeEdge_Outer: outer circle edge.EWedgeGaugeEdge_Origin: segment linking the inner and outer edge at theEWedge::GetAngle.NET Python.EWedgeGaugeEdge_End: segment linking the inner and outer edge atEWedge::GetAngle.NET Python andEWedge::GetAmplitude.NET Python.
Example of a wedge gauge.¶
Polygon Gauge¶
In orange, the closed or open polygon gauge and, in green, the measured transition points¶
Description: the polygon gauge finds a polygon that fits edges of the image as specified by the measurement parameters.
Nominal shape: a polygon (
EPolygon.NET Python)Use
EPolygonGauge::GetNominal.NET Python to set the nominal polygon.
Measured shape: a polygon (
EPolygon.NET Python)Use
EPolygonGauge::GetMeasuredPolygon.NET Python to get the measured polygon.When using the global measurement mode, the nominal polygon is transformed using an isotropic affine transform:
Use
EPolygonGauge::GetMeasuredPolygonTransformation.NET Python to get theEFrame.NET Python object corresponding to this transformation.Scaling is only considered if
EPolygonGauge.EnableScalingis true.Use
EPolygonGauge::GetMeasuredOffset.NET Python,EPolygonGauge::GetMeasuredScale.NET Python andEPolygonGauge::GetMeasuredAngle.NET Python to directly get the offset, scale and angle of the transformation.
Specific parameters:
The measurement mode:
EPolygonGauge::GetMeasurementMode.NET PythonIn the mode
EPolygonMeasurementMode_Global.NET Python, the polygon is rigid and the measured polygon is an isotropic affine transformation of the nominal polygon.The position, orientation and optionally the scale of the polygon are adjusted to fit the measured points.
By default, the measurement mode is
EPolygonMeasurementMode_Global.NET Python.If a scaling is required, you must enable it with
EPolygonGauge::GetEnableScaling.NET Python.
Note
The global measurement succeeds only if all the lines of the polygon can be fitted. If the measurement fails, try to simplify your polygon.
The
Globalmeasurement mode: the measured polygon is a translation and a rotation of the input polygon¶In the mode
EPolygonMeasurementMode_Edge.NET Python, the edges of the polygon are measured independently.The result is a new polygon composed of each of the nominal edge fitted to the image.
The number of edges of the measured polygon is the same as the nominal polygon.
The input polygon (blue) and the fitted polygon (green)¶
In the mode
EPolygonMeasurementMode_Point.NET Python, the measured polygon edges are sampled to fit closely to all the measured points.The measured polygon is simplified using a filtering threshold (
EBaseGauge::GetFilteringThreshold.NET Python) to reduce the number of edges while keeping the shape of the object.The measured number of edges depends on the geometry of the contour of the object and on the filtering threshold.
A polygon gauge with a single edge produces a measured polygon that follows the contour of the object¶
Depending on the filtering threshold, the number of vertices is reduced.