CVBpy 15.0
Rect Class Reference

Rectangle object. More...

Inherits object.

Public Member Functions

bool contains (self, cvb.Point2D point)
 Checks if this rectangle contains a point. More...
 
cvb.Rect create (float left=0.0, float top=0.0, float right=0.0, float bottom=0.0)
 Default rectangle. More...
 
cvb.Rect create (cvb.Point2D location, cvb.Size2D size)
 Constructor for a rectangle with location and size. More...
 

Properties

 bottom = property
 float: Gets or sets bottom row of the rectangle (still inside the rectangle).
 
 coordinate_system = property
 int: Indicates the coordinate system in which this object is being measured (when used as an area of interest, see cvb.CoordinateSystemType).
 
 height = property
 float: Gets or sets the height of the rectangle.
 
 left = property
 float: Gets or sets first column of the rectangle.
 
 location = property
 cvb.Point2D: Gets or sets the location of the top left corner of the rectangle.
 
 right = property
 float: Gets or sets rightmost column of the rectangle (still inside the rectangle).
 
 size = property
 cvb.Size2D: Gets or sets the size of the rectangle.
 
 top = property
 float: Gets or sets first row of the rectangle.
 
 width = property
 float: Gets or sets the width of the rectangle.
 

Detailed Description

Rectangle object.

Common Vision Blox always uses rectangles (or rectangular shaped areas of interest represented by integer parameters left, top, right and bottom) in such a way, that right and bottom are still part of the area to be investigated(that means width = right - left + 1 and height = bottom - top + 1).

Supports the same arguments as cvb.Rect.create.

Parameters

*args : Any Parameters like cvb.Rect.create.

**kwargs : Any Parameters like cvb.Rect.create.

Member Function Documentation

◆ contains()

bool contains (   self,
cvb.Point2D  point 
)

Checks if this rectangle contains a point.

Parameters

point : cvb.Point2D Point to check.

Returns

bool True if the point is inside this rectangle, False otherwise.

◆ create() [1/2]

cvb.Rect create ( cvb.Point2D  location,
cvb.Size2D  size 
)

Constructor for a rectangle with location and size.

Parameters

location : cvb.Point2D Location of the rectangle.

size : cvb.Size2D Size of the rectangle.

Returns

cvb.Rect New rectangle.

◆ create() [2/2]

cvb.Rect create ( float   left = 0.0,
float   top = 0.0,
float   right = 0.0,
float   bottom = 0.0 
)

Default rectangle.

Parameters

left : float Leftmost point of the rectangle.

top : float Topmost point of the rectangle.

right : float Rightmost point of the rectangle.

bottom : float Bottom point of the rectangle.

Returns

cvb.Rect New rectangle.