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

Represents a model of a rectangle. More...

Inheritance diagram for eVision.ERectangle:
Collaboration diagram for eVision.ERectangle:

Public Member Functions

None __init__ (self)
 Constructs a eVision.ERectangle.
None __init__ (self, eVision.EPoint center, float sizeX, float sizeY, float angle)
 Constructs a eVision.ERectangle.
None __init__ (self, eVision.EPoint center, float sizeX, float sizeY)
 Constructs a eVision.ERectangle.
None __init__ (self, eVision.EPoint origin, eVision.EPoint end)
 Constructs a eVision.ERectangle.
None __init__ (self, eVision.EPoint origin, eVision.EPoint middle, eVision.EPoint end)
 Constructs a eVision.ERectangle.
None __init__ (self, eVision.ERectangle other)
 Constructs a eVision.ERectangle.
None __init__ (self, eVision.ERotatedBoundingBox other)
 Constructs a eVision.ERectangle.
None CopyTo (self, eVision.ERectangle other)
 Copies all the data from this object to the other object.
eVision.ERectangle LocalToSensor (self, eVision.EFrame frame)
 Transforms a rectangle from local to sensor coordinates.
eVision.ERectangle SensorToLocal (self, eVision.EFrame frame)
 Transforms a rectangle from sensor to local coordinates.
None SetFromOppositeCorners (self, eVision.EPoint origin, eVision.EPoint end)
 Sets the geometric parameters (center coordinates, size, and rotation angle) of an eVision.ERectangle object.
None SetFromThreeCorners (self, eVision.EPoint origin, eVision.EPoint middle, eVision.EPoint end)
 Sets the geometric parameters (center coordinates, size, and rotation angle) of an eVision.ERectangle object.
None SetSize (self, float sizeX, float sizeY)
 Sets the size of a eVision.ERectangle object.
eVision.EPoint GetPoint (self, float fractionX, float fractionY)
 Returns the coordinates of a particular point, specified by its location in the eVision.ERectangle area.
None GetMidEdges (self, eVision.EPoint x, eVision.EPoint XX, eVision.EPoint y, eVision.EPoint YY)
 Retrieves the center coordinates of each edge of a eVision.ERectangle object.
None GetCorners (self, eVision.EPoint xy, eVision.EPoint XXy, eVision.EPoint xYY, eVision.EPoint XXYY)
 Retrieves the coordinates of each corner of a eVision.ERectangle object.
None GetEdges (self, eVision.ELine x, eVision.ELine XX, eVision.ELine y, eVision.ELine YY)
 Retrieves each edge of a eVision.ERectangle object.
bool Contains (self, eVision.EPoint p)
 Whether the specified point is inside the rectangle or not.
float ComputeOverlap (self, eVision.ERectangle other)
 Computes the overlap (intersection / min(area1, area2)) of this and the other eVision.ERectangle.
bool IsEqual (self, eVision.ERectangle other)
 Comparison operator.
eVision.EPoint Center (self)
 Center of the eVision.ERectangle.
 Center (self, eVision.EPoint value)
 Center of the eVision.ERectangle.
float CenterX (self)
 Abscissa of the center of the eVision.ERectangle.
 CenterX (self, float value)
 Abscissa of the center of the eVision.ERectangle.
float CenterY (self)
 Ordinate of the the center of the eVision.ERectangle.
 CenterY (self, float value)
 Ordinate of the the center of the eVision.ERectangle.
float Angle (self)
 Orientation of the eVision.ERectangle.
 Angle (self, float value)
 Orientation of the eVision.ERectangle.
float SizeX (self)
 X size of the eVision.ERectangle.
 SizeX (self, float value)
 X size of the eVision.ERectangle.
float SizeY (self)
 Y size of the eVision.ERectangle.
 SizeY (self, float value)
 Y size of the eVision.ERectangle.
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.

Detailed Description

Represents a model of a rectangle.

Remarks:

License(s): BasicTypes

Constructor & Destructor Documentation

◆ __init__() [1/7]

None eVision.ERectangle.__init__ ( self)

Constructs a eVision.ERectangle.

◆ __init__() [2/7]

None eVision.ERectangle.__init__ ( self,
eVision.EPoint center,
float sizeX,
float sizeY,
float angle )

Constructs a eVision.ERectangle.

Parameters
centerCenter coordinates of the rectangle at its nominal position. The default value is (0,0).
sizeXNominal size X/Y of the rectangle. Both default values are 100.
sizeYNominal size X/Y of the rectangle. Both default values are 100.
angleNominal rotation angle of the rectangle. The default value is 0.

◆ __init__() [3/7]

None eVision.ERectangle.__init__ ( self,
eVision.EPoint center,
float sizeX,
float sizeY )

Constructs a eVision.ERectangle.

Parameters
centerCenter coordinates of the rectangle at its nominal position. The default value is (0,0).
sizeXNominal size X/Y of the rectangle. Both default values are 100.
sizeYNominal size X/Y of the rectangle. Both default values are 100.

◆ __init__() [4/7]

None eVision.ERectangle.__init__ ( self,
eVision.EPoint origin,
eVision.EPoint end )

Constructs a eVision.ERectangle.

Parameters
originUpper left point coordinates of the rectangle.
endLower right point coordinates of the rectangle.

◆ __init__() [5/7]

None eVision.ERectangle.__init__ ( self,
eVision.EPoint origin,
eVision.EPoint middle,
eVision.EPoint end )

Constructs a eVision.ERectangle.

Parameters
originUpper left point coordinates of the rectangle.
middleA third corner point coordinates.
endLower right point coordinates of the rectangle.

◆ __init__() [6/7]

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

Constructs a eVision.ERectangle.

Parameters
otherAnother object to be copied in the new object.

◆ __init__() [7/7]

None eVision.ERectangle.__init__ ( self,
eVision.ERotatedBoundingBox other )

Constructs a eVision.ERectangle.

Parameters
otherAnother object to be copied in the new object.

Member Function Documentation

◆ Angle() [1/2]

float eVision.ERectangle.Angle ( self)

Orientation of the eVision.ERectangle.

◆ Angle() [2/2]

eVision.ERectangle.Angle ( self,
float value )

Orientation of the eVision.ERectangle.

◆ AvailableEditionModes()

eVision.EEditionMode eVision.ERectangle.AvailableEditionModes ( self)

Available edition modes for the shape.

Reimplemented from eVision.EShape.

◆ Center() [1/2]

eVision.EPoint eVision.ERectangle.Center ( self)

Center of the eVision.ERectangle.

◆ Center() [2/2]

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

Center of the eVision.ERectangle.

◆ CenterX() [1/2]

float eVision.ERectangle.CenterX ( self)

Abscissa of the center of the eVision.ERectangle.

◆ CenterX() [2/2]

eVision.ERectangle.CenterX ( self,
float value )

Abscissa of the center of the eVision.ERectangle.

◆ CenterY() [1/2]

float eVision.ERectangle.CenterY ( self)

Ordinate of the the center of the eVision.ERectangle.

◆ CenterY() [2/2]

eVision.ERectangle.CenterY ( self,
float value )

Ordinate of the the center of the eVision.ERectangle.

◆ ComputeOverlap()

float eVision.ERectangle.ComputeOverlap ( self,
eVision.ERectangle other )

Computes the overlap (intersection / min(area1, area2)) of this and the other eVision.ERectangle.

Parameters
otherThe other eVision.ERectangle to which we compute overlap.

◆ Contains()

bool eVision.ERectangle.Contains ( self,
eVision.EPoint p )

Whether the specified point is inside the rectangle or not.

Parameters
pA point.

◆ CopyTo()

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

Copies all the data from this object to the other object.

Parameters
otherOther eVision.ERectangle object in which to copy the content of this object.

◆ Description()

str eVision.ERectangle.Description ( self)

Textual description of the shape and its parameters.

Reimplemented from eVision.EShape.

◆ GetCorners()

None eVision.ERectangle.GetCorners ( self,
eVision.EPoint xy,
eVision.EPoint XXy,
eVision.EPoint xYY,
eVision.EPoint XXYY )

Retrieves the coordinates of each corner of a eVision.ERectangle object.

Parameters
xyCoordinates of the lower leftmost corner of the eVision.ERectangle object.
XXyCoordinates of the lower rightmost corner of the eVision.ERectangle object.
xYYCoordinates of the upper leftmost corner of the eVision.ERectangle object.
XXYYCoordinates of the upper rightmost corner of the eVision.ERectangle object.

◆ GetEdges()

None eVision.ERectangle.GetEdges ( self,
eVision.ELine x,
eVision.ELine XX,
eVision.ELine y,
eVision.ELine YY )

Retrieves each edge of a eVision.ERectangle object.

Parameters
xLeftmost edge of the eVision.ERectangle object.
XXRightmost edge of the eVision.ERectangle object.
yLower edge of the eVision.ERectangle object.
YYUpper edge of the eVision.ERectangle object.

◆ GetMidEdges()

None eVision.ERectangle.GetMidEdges ( self,
eVision.EPoint x,
eVision.EPoint XX,
eVision.EPoint y,
eVision.EPoint YY )

Retrieves the center coordinates of each edge of a eVision.ERectangle object.

Parameters
xCenter coordinates of the leftmost edge of the eVision.ERectangle object.
XXCenter coordinates of the rightmost edge of the eVision.ERectangle object.
yCenter coordinates of the lower edge of the eVision.ERectangle object.
YYCenter coordinates of the upper edge of the eVision.ERectangle object.

◆ GetPoint()

eVision.EPoint eVision.ERectangle.GetPoint ( self,
float fractionX,
float fractionY )

Returns the coordinates of a particular point, specified by its location in the eVision.ERectangle area.

Parameters
fractionXPoint location expressed as a fraction of the eVision.ERectangle vertical edges (range -1, +1).
fractionYPoint location expressed as a fraction of the eVision.ERectangle horizontal edges (range -1, +1).

◆ IsEqual()

bool eVision.ERectangle.IsEqual ( self,
eVision.ERectangle other )

Comparison operator.

Remarks:

The comparison is only applied on the geometrical parameters of the eVision.ERectangle and not its drawing and graphic manipulation or its frame of reference.

Parameters
otherOther eVision.ERectangle to compare to.

◆ LocalToSensor()

eVision.ERectangle eVision.ERectangle.LocalToSensor ( self,
eVision.EFrame frame )

Transforms a rectangle from local to sensor coordinates.

This method throws an exception if the input frame has an anisotropic scale and if the angle is non-null.

Parameters
frameReference frame in which the region is defined.

◆ SensorToLocal()

eVision.ERectangle eVision.ERectangle.SensorToLocal ( self,
eVision.EFrame frame )

Transforms a rectangle from sensor to local coordinates.

This method throws an exception if the input frame has an anisotropic scale and if the angle is non-null.

Parameters
frameReference frame in which the region is defined.

◆ SetFromOppositeCorners()

None eVision.ERectangle.SetFromOppositeCorners ( self,
eVision.EPoint origin,
eVision.EPoint end )

Sets the geometric parameters (center coordinates, size, and rotation angle) of an eVision.ERectangle object.

Parameters
originUpper left point coordinates of the rectangle.
endLower right point coordinates of the rectangle.

◆ SetFromThreeCorners()

None eVision.ERectangle.SetFromThreeCorners ( self,
eVision.EPoint origin,
eVision.EPoint middle,
eVision.EPoint end )

Sets the geometric parameters (center coordinates, size, and rotation angle) of an eVision.ERectangle object.

Parameters
originUpper left point coordinates of the rectangle.
middleA third corner point coordinates.
endLower right point coordinates of the rectangle.

◆ SetSize()

None eVision.ERectangle.SetSize ( self,
float sizeX,
float sizeY )

Sets the size of a eVision.ERectangle object.

Remarks:

A eVision.ERectangle object is fully defined knowing its nominal position (given by the coordinates of its center), its nominal size, its rotation angle and its outline tolerance. By default, the width and height values are 100, which means 100 pixels when the field of view is not calibrated and 100 "units" in case of a calibrated field of view.

Parameters
sizeXNominal size X of the eVision.ERectangle object. Default values is 100.
sizeYNominal size Y of the eVision.ERectangle object. Default values is 100.

◆ SizeX() [1/2]

float eVision.ERectangle.SizeX ( self)

X size of the eVision.ERectangle.

◆ SizeX() [2/2]

eVision.ERectangle.SizeX ( self,
float value )

X size of the eVision.ERectangle.

◆ SizeY() [1/2]

float eVision.ERectangle.SizeY ( self)

Y size of the eVision.ERectangle.

◆ SizeY() [2/2]

eVision.ERectangle.SizeY ( self,
float value )

Y size of the eVision.ERectangle.