Rectangle
The Rectangle
tag is used to add a rectangle (Bounding Box) to an image without selecting a label. This can be useful when you have only one label to assign to a rectangle.
Use with the following data types: image.
Parameters
Param | Type | Default | Description |
---|---|---|---|
name | string |
Name of the element | |
toName | string |
Name of the image to label | |
[opacity] | float |
0.6 |
Opacity of rectangle |
[fillColor] | string |
Rectangle fill color in hexadecimal | |
[strokeColor] | string |
"#f48a42" |
Stroke color in hexadecimal |
[strokeWidth] | number |
1 |
Width of the stroke |
[canRotate] | boolean |
true |
Whether to show or hide rotation control |
[smart] | boolean |
Show smart tool for interactive pre-annotations | |
[smartOnly] | boolean |
Only show smart tool for interactive pre-annotations |
Example
Basic labeling configuration for adding rectangular bounding box regions to an image
<View>
<Rectangle name="rect-1" toName="img-1" />
<Image name="img-1" value="$img" />
</View>