Structure that represents an area of interest in the image. More...
Inherits object.
Public Member Functions | |
cvb.Area2D | create () |
Default constructor for an empty area. More... | |
None | swap_orientation (self) |
Let the vertices P1 and P2 swap their place. | |
None | transform (self, cvb.Matrix2D matrix) |
Transform this Area2D using a matrix. More... | |
None | transform_affine (self, cvb.AffineMatrix2D affine_matrix) |
Transform this Area2D using a affine matrix. More... | |
Properties | |
area = property | |
float: Size (in pixels) of the area of interest. More... | |
bounding_rectangle = property | |
cvb.Rect: Gets the bounding box of this area. | |
coordinate_system = property | |
int: Indicates the coordinate system, in which this object is being measured (when used as an area of interest). | |
p0 = property | |
cvb.Point2D: Get or set P0 of the area (top left corner). | |
p1 = property | |
cvb.Point2D: Get or set P1 of the area (lower left corner). | |
p2 = property | |
cvb.Point2D: Get or set P2 of the area (top right corner). | |
p3 = property | |
cvb.Point2D: Gets the calculated P3 of the area (lower right corner). | |
size = property | |
cvb.Size2D: Size (width and height) of the area of interest. | |
Structure that represents an area of interest in the image.
The pixels of this type are always specified in image coordinates.
Supports the same arguments as cvb.Area2D.create.
*args : Any Parameters like cvb.Area2D.create.
**kwargs : Any Parameters like cvb.Area2D.create.
cvb.Area2D create | ( | ) |
Default constructor for an empty area.
cvb.Area2D The area.
Constructor for an area from points.
p0 : cvb.Point2D P0 (top left corner of the area
p1 : cvb.Point2D P1(top right corner of the area)
p2 : cvb.Point2D P2 (bottom left corner of the area
cvb.Area2D The area.
Creates an area from the given rectangle using a transformation.
rect : cvb.Rect Rectangle to convert to image coordinates via the matrix.
affine_matrix : Optional[cvb.AffineMatrix2D] Affine matrix to transform pixel coordinates to image.
cvb.Area2D The area.
Constructor for Area2D from a radius.
radius : float Radius to construct the area with.
cvb.Area2D The area.
None transform | ( | self, | |
cvb.Matrix2D | matrix | ||
) |
Transform this Area2D using a matrix.
matrix : cvb.Matrix2D Matrix to transform this area with.
None transform_affine | ( | self, | |
cvb.AffineMatrix2D | affine_matrix | ||
) |
Transform this Area2D using a affine matrix.
affine_matrix : cvb.AffineMatrix2D Affine matrix to transform this area with.
|
static |
float: Size (in pixels) of the area of interest.
As the area is a parallelogram the area (in pixels) is not simply width * height.