eVision Python API
Loading...
Searching...
No Matches
eVision.EEllipse Class Reference

Represents a model of an (arc of) ellipse. More...

Inheritance diagram for eVision.EEllipse:
Collaboration diagram for eVision.EEllipse:

Public Member Functions

None __init__ (self)
 Constructs a eVision.EEllipse object.
None __init__ (self, eVision.EPoint center, float radiusX, float radiusY, float radiusXOrientation, bool direct)
 Constructs a eVision.EEllipse object.
None __init__ (self, eVision.EPoint center, float radiusX, float radiusY, float radiusXOrientation)
 Constructs a eVision.EEllipse object.
None __init__ (self, eVision.EPoint center, float radiusX, float radiusY, float radiusXOrientation, float originAngle, float amplitude, bool direct)
 Constructs a eVision.EEllipse object.
None __init__ (self, eVision.EPoint center, float radiusX, float radiusY, float radiusXOrientation, float originAngle, float amplitude)
 Constructs a eVision.EEllipse object.
None __init__ (self, eVision.EEllipse other)
 Constructs a eVision.EEllipse object.
None CopyTo (self, eVision.EEllipse other)
 Copies all the data of the current eVision.EEllipse object into another eVision.EEllipse object and returns it.
bool IsFull (self)
 Flag indicating whether the eVision.EEllipse object is a full ellipse or not.
bool IsDirect (self)
 Flag indicating whether positive angles correspond to a clockwise or an anticlockwise rotation.
eVision.EPoint Center (self)
 Center of the eVision.EEllipse.
 Center (self, eVision.EPoint value)
 Center of the eVision.EEllipse.
float CenterX (self)
 Abscissa of the center of the eVision.EEllipse.
 CenterX (self, float value)
 Abscissa of the center of the eVision.EEllipse.
float CenterY (self)
 Ordinate of the the center of the eVision.EEllipse.
 CenterY (self, float value)
 Ordinate of the the center of the eVision.EEllipse.
float Angle (self)
 Orientation of the eVision.EEllipse.
 Angle (self, float value)
 Orientation of the eVision.EEllipse.
float HorizontalRadius (self)
 Horizontal Radius of a eVision.EEllipse object.
 HorizontalRadius (self, float value)
 Horizontal Radius of a eVision.EEllipse object.
float VerticalRadius (self)
 Vertical Radius of a eVision.EEllipse object.
 VerticalRadius (self, float value)
 Vertical Radius of a eVision.EEllipse object.
float HorizontalRadiusOrientation (self)
 Orientation of the horizontal Radius of a eVision.EEllipse object.
 HorizontalRadiusOrientation (self, float value)
 Orientation of the horizontal Radius of a eVision.EEllipse object.
float OriginAngle (self)
 Angular position from where the eVision.EEllipse object extents.
 OriginAngle (self, float value)
 Angular position from where the eVision.EEllipse object extents.
float EndAngle (self)
 Angular position of the end of a eVision.EEllipse object.
float Amplitude (self)
 Angular amplitude of the eVision.EEllipse object.
 Amplitude (self, float value)
 Angular amplitude of the eVision.EEllipse object.
eVision.EEditionMode AvailableEditionModes (self)
 Available edition modes for the shape.
str Description (self)
 Textual description of the shape and its parameters.
Public Member Functions inherited from eVision.EShape
None Load (self, str path)
 Load the eVision.EShape configuration.
None Load (self, eVision.ESerializer|None serializer)
 Load the eVision.EShape configuration.
None Save (self, str path)
 Save the eVision.EShape configuration.
None Save (self, eVision.ESerializer|None serializer)
 Save the eVision.EShape configuration.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, float zoomX, float zoomY, float panX, float panY, bool drawDiagonals)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, float zoomX, float zoomY, float panX, float panY)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, float zoomX, float zoomY, float panX)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, float zoomX, float zoomY)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, float zoomX)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY, bool drawDiagonals)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame, float zoomX, float zoomY, float panX)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame, float zoomX, float zoomY)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame, float zoomX)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame)
 Draws the eVision.EShape shape.
eVision.EEditionMode HitTest (self, int x, int y, float zoomX, float zoomY, float panX, float panY)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (self, int x, int y, float zoomX, float zoomY, float panX)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (self, int x, int y, float zoomX, float zoomY)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (self, int x, int y, float zoomX)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (self, int x, int y, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (self, int x, int y, eVision.EFrame frame, float zoomX, float zoomY, float panX)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (self, int x, int y, eVision.EFrame frame, float zoomX, float zoomY)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (self, int x, int y, eVision.EFrame frame, float zoomX)
 Detects if the cursor is placed over one of the dragging handles.
None Drag (self, int x, int y, float zoomX, float zoomY, float panX, float panY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y, float zoomX, float zoomY, float panX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y, float zoomX, float zoomY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y, float zoomX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y, eVision.EFrame frame, float zoomX, float zoomY, float panX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y, eVision.EFrame frame, float zoomX, float zoomY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y, eVision.EFrame frame, float zoomX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y, eVision.EFrame frame)
 Moves the specified handle to a new position and updates all placement parameters of the region.
eVision.EFrame ToFrame (self, bool useAngle, eVision.EFrameScaling frameScaling)
 Converts the shape to a frame.
eVision.EFrame ToFrame (self, bool useAngle, eVision.EFrameScaling frameScaling, eVision.EFrame shapeFrame)
 Converts the shape to a frame.
eVision.EEditionMode EditionMode (self)
 Current edition mode for the shape.
 EditionMode (self, eVision.EEditionMode value)
 Current edition mode for the shape.

Static Public Member Functions

float GetDistanceBetweenPointAndEllipse (eVision.EPoint pt, eVision.EEllipse ellipse, bool limited)
 Computes the distance between a point and an ellipse.
float GetDistanceBetweenPointAndEllipse (eVision.EPoint pt, eVision.EEllipse ellipse)
 Computes the distance between a point and an ellipse.
eVision.EEllipse Fit (list[eVision._eVision.EPoint] points, bool fitArc, int numFilteringPasses, float filteringThreshold)
 Fits an ellipse to a set of points.
eVision.EEllipse Fit (list[eVision._eVision.EPoint] points, bool fitArc, int numFilteringPasses)
 Fits an ellipse to a set of points.
eVision.EEllipse Fit (list[eVision._eVision.EPoint] points, bool fitArc)
 Fits an ellipse to a set of points.
eVision.EEllipse Fit (list[eVision._eVision.EPoint] points)
 Fits an ellipse to a set of points.

Detailed Description

Represents a model of an (arc of) ellipse.

Remarks:

License(s): BasicTypes

Constructor & Destructor Documentation

◆ __init__() [1/6]

None eVision.EEllipse.__init__ ( self)

Constructs a eVision.EEllipse object.

◆ __init__() [2/6]

None eVision.EEllipse.__init__ ( self,
eVision.EPoint center,
float radiusX,
float radiusY,
float radiusXOrientation,
bool direct )

Constructs a eVision.EEllipse object.

Parameters
centerCenter coordinates of the ellipse at its nominal position. The default value is (0,0).
radiusXhorizontal radius of the ellipse. The default value is 100.
radiusYvertical radius of the ellipse. The default value is 50.
radiusXOrientationOrientation of the horizontal radius of the ellipse. The default value is 0.
directtrue (default) means that angles increase anticlockwisely in a direct coordinate system.

◆ __init__() [3/6]

None eVision.EEllipse.__init__ ( self,
eVision.EPoint center,
float radiusX,
float radiusY,
float radiusXOrientation )

Constructs a eVision.EEllipse object.

Parameters
centerCenter coordinates of the ellipse at its nominal position. The default value is (0,0).
radiusXhorizontal radius of the ellipse. The default value is 100.
radiusYvertical radius of the ellipse. The default value is 50.
radiusXOrientationOrientation of the horizontal radius of the ellipse. The default value is 0.

◆ __init__() [4/6]

None eVision.EEllipse.__init__ ( self,
eVision.EPoint center,
float radiusX,
float radiusY,
float radiusXOrientation,
float originAngle,
float amplitude,
bool direct )

Constructs a eVision.EEllipse object.

Parameters
centerCenter coordinates of the ellipse at its nominal position. The default value is (0,0).
radiusXhorizontal radius of the ellipse. The default value is 100.
radiusYvertical radius of the ellipse. The default value is 50.
radiusXOrientationOrientation of the horizontal radius of the ellipse. The default value is 0.
originAngleNominal angular origin of the (arc of) ellipse. The default value is 0°.
amplitudeNominal angular amplitude of the (arc of) ellipse. The default value is 360°.
directtrue (default) means that angles increase anticlockwisely in a direct coordinate system.

◆ __init__() [5/6]

None eVision.EEllipse.__init__ ( self,
eVision.EPoint center,
float radiusX,
float radiusY,
float radiusXOrientation,
float originAngle,
float amplitude )

Constructs a eVision.EEllipse object.

Parameters
centerCenter coordinates of the ellipse at its nominal position. The default value is (0,0).
radiusXhorizontal radius of the ellipse. The default value is 100.
radiusYvertical radius of the ellipse. The default value is 50.
radiusXOrientationOrientation of the horizontal radius of the ellipse. The default value is 0.
originAngleNominal angular origin of the (arc of) ellipse. The default value is 0°.
amplitudeNominal angular amplitude of the (arc of) ellipse. The default value is 360°.

◆ __init__() [6/6]

None eVision.EEllipse.__init__ ( self,
eVision.EEllipse other )

Constructs a eVision.EEllipse object.

Parameters
otherAnother eVision.EEllipse object to be copied in the new eVision.EEllipse object.

Member Function Documentation

◆ Amplitude() [1/2]

float eVision.EEllipse.Amplitude ( self)

Angular amplitude of the eVision.EEllipse object.

Remarks:

The default value is 360°. The sign of the rotation angle depends whether the field of view is calibrated or not.

  • When the field of view is calibrated, the coordinate system is said to be direct, the abscissa extends rightwards and the ordinate extends upwards. In this case, an anticlockwise rotation leads to a positive angle value.
  • When the field of view is not calibrated, the coordinate system is said to be inverse, the abscissa extends rightwards and the ordinate extends downwards. In this case, a clockwise rotation leads to a positive angle value.

◆ Amplitude() [2/2]

eVision.EEllipse.Amplitude ( self,
float value )

Angular amplitude of the eVision.EEllipse object.

Remarks:

The default value is 360°. The sign of the rotation angle depends whether the field of view is calibrated or not.

  • When the field of view is calibrated, the coordinate system is said to be direct, the abscissa extends rightwards and the ordinate extends upwards. In this case, an anticlockwise rotation leads to a positive angle value.
  • When the field of view is not calibrated, the coordinate system is said to be inverse, the abscissa extends rightwards and the ordinate extends downwards. In this case, a clockwise rotation leads to a positive angle value.

◆ Angle() [1/2]

float eVision.EEllipse.Angle ( self)

Orientation of the eVision.EEllipse.

◆ Angle() [2/2]

eVision.EEllipse.Angle ( self,
float value )

Orientation of the eVision.EEllipse.

◆ AvailableEditionModes()

eVision.EEditionMode eVision.EEllipse.AvailableEditionModes ( self)

Available edition modes for the shape.

Reimplemented from eVision.EShape.

◆ Center() [1/2]

eVision.EPoint eVision.EEllipse.Center ( self)

Center of the eVision.EEllipse.

◆ Center() [2/2]

eVision.EEllipse.Center ( self,
eVision.EPoint value )

Center of the eVision.EEllipse.

◆ CenterX() [1/2]

float eVision.EEllipse.CenterX ( self)

Abscissa of the center of the eVision.EEllipse.

◆ CenterX() [2/2]

eVision.EEllipse.CenterX ( self,
float value )

Abscissa of the center of the eVision.EEllipse.

◆ CenterY() [1/2]

float eVision.EEllipse.CenterY ( self)

Ordinate of the the center of the eVision.EEllipse.

◆ CenterY() [2/2]

eVision.EEllipse.CenterY ( self,
float value )

Ordinate of the the center of the eVision.EEllipse.

◆ CopyTo()

None eVision.EEllipse.CopyTo ( self,
eVision.EEllipse other )

Copies all the data of the current eVision.EEllipse object into another eVision.EEllipse object and returns it.

Remarks:

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

Parameters
othereVision.EEllipse object in which the current eVision.EEllipse object data have to be copied.

◆ Description()

str eVision.EEllipse.Description ( self)

Textual description of the shape and its parameters.

Reimplemented from eVision.EShape.

◆ EndAngle()

float eVision.EEllipse.EndAngle ( self)

Angular position of the end of a eVision.EEllipse object.

Remarks:

The sign of the rotation angle depends whether the field of view is calibrated or not.

  • When the field of view is calibrated, the coordinate system is said to be direct, the abscissa extends rightwards and the ordinate extends upwards. In this case, an anticlockwise rotation leads to a positive angle value.
  • When the field of view is not calibrated, the coordinate system is said to be inverse, the abscissa extends rightwards and the ordinate extends downwards. In this case, a clockwise rotation leads to a positive angle value.

◆ Fit() [1/4]

eVision.EEllipse eVision.EEllipse.Fit ( list[eVision._eVision.EPoint] points)
static

Fits an ellipse to a set of points.

Remarks:

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).

This method returns a "direct" eVision.EEllipse, see eVision.EEllipse.IsDirect.

Parameters
pointsVector of points to fit.

◆ Fit() [2/4]

eVision.EEllipse eVision.EEllipse.Fit ( list[eVision._eVision.EPoint] points,
bool fitArc )
static

Fits an ellipse to a set of points.

Remarks:

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).

This method returns a "direct" eVision.EEllipse, see eVision.EEllipse.IsDirect.

Parameters
pointsVector of points to fit.
fitArcIf true, an ellipse arc big enough to be close to all points will be returned instead of a full ellipse. Defaults to false.

◆ Fit() [3/4]

eVision.EEllipse eVision.EEllipse.Fit ( list[eVision._eVision.EPoint] points,
bool fitArc,
int numFilteringPasses )
static

Fits an ellipse to a set of points.

Remarks:

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).

This method returns a "direct" eVision.EEllipse, see eVision.EEllipse.IsDirect.

Parameters
pointsVector of points to fit.
fitArcIf true, an ellipse arc big enough to be close to all points will be returned instead of a full ellipse. Defaults to false.
numFilteringPassesNumber of filtering passes for an ellipse fitting operation. Defaults to 0 (no filtering performed).

◆ Fit() [4/4]

eVision.EEllipse eVision.EEllipse.Fit ( list[eVision._eVision.EPoint] points,
bool fitArc,
int numFilteringPasses,
float filteringThreshold )
static

Fits an ellipse to a set of points.

Remarks:

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).

This method returns a "direct" eVision.EEllipse, see eVision.EEllipse.IsDirect.

Parameters
pointsVector of points to fit.
fitArcIf true, an ellipse arc big enough to be close to all points will be returned instead of a full ellipse. Defaults to false.
numFilteringPassesNumber of filtering passes for an ellipse fitting operation. Defaults to 0 (no filtering performed).
filteringThresholdRelative filtering threshold, that is the fraction of the average distance between the points and the fitted model above which a point is filtered out. Defaults to 3.

◆ GetDistanceBetweenPointAndEllipse() [1/2]

float eVision.EEllipse.GetDistanceBetweenPointAndEllipse ( eVision.EPoint pt,
eVision.EEllipse ellipse )
static

Computes the distance between a point and an ellipse.

Note that we compute the distance between the point and its projection on the ellipse. This is not always the shortest distance.

Remarks:

When the ellipse is restricted to an arc and the orthogonal projection of the point onto the ellipse falls outside this arc, the distance to the closest endpoint of the arc is returned instead.

Parameters
ptThe point.
ellipseThe ellipse.

◆ GetDistanceBetweenPointAndEllipse() [2/2]

float eVision.EEllipse.GetDistanceBetweenPointAndEllipse ( eVision.EPoint pt,
eVision.EEllipse ellipse,
bool limited )
static

Computes the distance between a point and an ellipse.

Note that we compute the distance between the point and its projection on the ellipse. This is not always the shortest distance.

Remarks:

When the ellipse is restricted to an arc and the orthogonal projection of the point onto the ellipse falls outside this arc, the distance to the closest endpoint of the arc is returned instead.

Parameters
ptThe point.
ellipseThe ellipse.
limitedIndicates if the ellipse parameter should be considered as a full ellipse or as an arc.

◆ HorizontalRadius() [1/2]

float eVision.EEllipse.HorizontalRadius ( self)

Horizontal Radius of a eVision.EEllipse object.

◆ HorizontalRadius() [2/2]

eVision.EEllipse.HorizontalRadius ( self,
float value )

Horizontal Radius of a eVision.EEllipse object.

◆ HorizontalRadiusOrientation() [1/2]

float eVision.EEllipse.HorizontalRadiusOrientation ( self)

Orientation of the horizontal Radius of a eVision.EEllipse object.

◆ HorizontalRadiusOrientation() [2/2]

eVision.EEllipse.HorizontalRadiusOrientation ( self,
float value )

Orientation of the horizontal Radius of a eVision.EEllipse object.

◆ IsDirect()

bool eVision.EEllipse.IsDirect ( self)

Flag indicating whether positive angles correspond to a clockwise or an anticlockwise rotation.

Remarks:

true (default) means that angles increase anticlockwisely in a direct coordinate system, and clockwisely in an inverse coordinate system.

  • When the field of view is calibrated, the coordinate system is said to be direct, the abscissa extends rightwards and the ordinate extends upwards.
  • When the field of view is not calibrated, the coordinate system is said to be inverse, the abscissa extends rightwards and the ordinate extends downwards.

◆ IsFull()

bool eVision.EEllipse.IsFull ( self)

Flag indicating whether the eVision.EEllipse object is a full ellipse or not.

Remarks:

By default (true), the eVision.EEllipse object is a full ellipse.

◆ OriginAngle() [1/2]

float eVision.EEllipse.OriginAngle ( self)

Angular position from where the eVision.EEllipse object extents.

Remarks:

The sign of the rotation angle depends whether the field of view is calibrated or not.

  • When the field of view is calibrated, the coordinate system is said to be direct, the abscissa extends rightwards and the ordinate extends upwards. In this case, an anticlockwise rotation leads to a positive angle value.
  • When the field of view is not calibrated, the coordinate system is said to be inverse, the abscissa extends rightwards and the ordinate extends downwards. In this case, a clockwise rotation leads to a positive angle value.

◆ OriginAngle() [2/2]

eVision.EEllipse.OriginAngle ( self,
float value )

Angular position from where the eVision.EEllipse object extents.

Remarks:

The sign of the rotation angle depends whether the field of view is calibrated or not.

  • When the field of view is calibrated, the coordinate system is said to be direct, the abscissa extends rightwards and the ordinate extends upwards. In this case, an anticlockwise rotation leads to a positive angle value.
  • When the field of view is not calibrated, the coordinate system is said to be inverse, the abscissa extends rightwards and the ordinate extends downwards. In this case, a clockwise rotation leads to a positive angle value.

◆ VerticalRadius() [1/2]

float eVision.EEllipse.VerticalRadius ( self)

Vertical Radius of a eVision.EEllipse object.

◆ VerticalRadius() [2/2]

eVision.EEllipse.VerticalRadius ( self,
float value )

Vertical Radius of a eVision.EEllipse object.