RoiCrop¶
Bases: object
RoiCrop class defines a Region Of Interest for cropping.
Specifies a rectangular region defined by its top-left coordinates (x, y) and its dimensions (width, height) to be used for image cropping operations.
__init__()
¶
Default constructor.
Initializes a RoiCrop with all values set to 0.
getHeight()
¶
Get height.
Retrieves the height of the crop region.
Returns:
| Type | Description |
|---|---|
int
|
The height value |
setHeight(height)
¶
Set height.
Sets the height of the crop region.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height
|
int
|
The new height value |
required |
getWidth()
¶
Get width.
Retrieves the width of the crop region.
Returns:
| Type | Description |
|---|---|
int
|
The width value |
setWidth(width)
¶
Set width.
Sets the width of the crop region.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
width
|
int
|
The new width value |
required |
getX()
¶
Get X coordinate.
Retrieves the X coordinate (left) of the crop region.
Returns:
| Type | Description |
|---|---|
int
|
The X coordinate |
setX(x)
¶
Set X coordinate.
Sets the X coordinate (left) of the crop region.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
int
|
The new X coordinate |
required |
getY()
¶
Get Y coordinate.
Retrieves the Y coordinate (top) of the crop region.
Returns:
| Type | Description |
|---|---|
int
|
The Y coordinate |
setY(y)
¶
Set Y coordinate.
Sets the Y coordinate (top) of the crop region.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y
|
int
|
The new Y coordinate |
required |