Public Member Functions | Properties | List of all members
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...
 

Properties

 bottom = property
 float: Gets or sets bottom row of the rectangle (still inside the rectangle). More...
 
 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). More...
 
 height = property
 float: Gets or sets the height of the rectangle. More...
 
 left = property
 float: Gets or sets first column of the rectangle. More...
 
 location = property
 cvb.Point2D: Gets or sets the location of the top left corner of the rectangle. More...
 
 right = property
 float: Gets or sets rightmost column of the rectangle (still inside the rectangle). More...
 
 size = property
 cvb.Size2D: Gets or sets the size of the rectangle. More...
 
 top = property
 float: Gets or sets first row of the rectangle. More...
 
 width = property
 float: Gets or sets the width of the rectangle. More...
 

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

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.

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.

Property Documentation

◆ bottom

bottom = property
static

float: Gets or sets bottom row of the rectangle (still inside the rectangle).

◆ coordinate_system

coordinate_system = property
static

int: Indicates the coordinate system in which this object is being measured (when used as an area of interest, see cvb.CoordinateSystemType).

◆ height

height = property
static

float: Gets or sets the height of the rectangle.

◆ left

left = property
static

float: Gets or sets first column of the rectangle.

◆ location

location = property
static

cvb.Point2D: Gets or sets the location of the top left corner of the rectangle.

◆ right

right = property
static

float: Gets or sets rightmost column of the rectangle (still inside the rectangle).

◆ size

size = property
static

cvb.Size2D: Gets or sets the size of the rectangle.

◆ top

top = property
static

float: Gets or sets first row of the rectangle.

◆ width

width = property
static

float: Gets or sets the width of the rectangle.