dsdl.geometry.rotate_box
RBBox
Bases: BaseGeometry
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/rotate_box.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
|
polygon_value
property
Get the xyxy
mode bounding box's value.
Returns:
Type | Description |
---|---|
The |
rbbox_value
property
Get the xywht
mode bounding box's value.
Returns:
Type | Description |
---|---|
The |
__init__(value, mode='xywht', measure='radian')
A Geometry class which abstracts a rotated bounding box object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
The value of the current rotated bounding box.
When the |
required | |
mode |
The mode of the given |
'xywht'
|
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/rotate_box.py
point_for_draw(mode='lt')
Get the point's coordinate where a legend is fit to draw.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode |
str
|
The position model. Only "lb", "lt", "rb", "rt" are permitted, which mean get the coordinate of left bottom, left top, right bottom and right top corresponding. |
'lt'
|
Returns:
Type | Description |
---|---|
The coordinate corresponding to the |
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/rotate_box.py
polygon2rbbox(value)
staticmethod
Converted the xyxy
mode bounding box into xywht
mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
The |
required |
Returns:
Type | Description |
---|---|
The coresponding |
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/rotate_box.py
rbbox2polygon(value)
staticmethod
Convert the xywht
mode bounding box into xyxy
mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
The |
required |
Returns:
Type | Description |
---|---|
The coresponding |
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/rotate_box.py
visualize(image, palette, **kwargs)
Draw the current rotated bounding box on an given image.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
image |
The image where the rotated bounding box to be drawn. |
required | |
palette |
The palette which stores the color of different category name. |
required | |
**kwargs |
Other annotations which may be used when drawing the current bounding box, such as |
{}
|
Returns:
Type | Description |
---|---|
The image where the current rotated bounding box has been drawn on. |