View source: R/prepare_dataset.R
normalize_box | R Documentation |
Takes one or more bounding box and normalize each of their dimensions to size
. If you notice it is
just like calculating percentage except takes size = 1000
instead of 100.
normalize_box(bbox, width, height, size = 1000)
width |
(int): total width of the image |
height |
(int): total height of the image |
size |
(int): target value to normalize bounding_box to. (default 1000) |
box |
(vector of 4 int): the original bounding-box coordinates (xmin, ymin, xmax, ymax) |
a vector of size 4 integers with values normalised to size
.
# normalise bounding-box in percent
normalize_box(c(227,34,274,41), width = 2100, height = 3970, size = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.