bbx_matrix: Convert bbx to matrix and matrix/vectors to bbx

Description Usage Arguments Value Examples

Description

Convert bbx to matrix and matrix/vectors to bbx

Usage

1
2
3
4
5
bbx_to_bbm(bbx)

bbm_to_bbx(m)

coords_to_bbx(x1, y1, x2, y2)

Arguments

bbx

character vector of bbxes (top-left coordinates). Expects four integers separated by comma or space

m

matrix, where columns represent x1, y1, x2, y2 of bbx

x1, y1, x2, y2

vectors representing x1, y1, x2, y2 of bbx

Value

character vector of bbxes

Examples

1
2
3
4
5
bbx_to_bbm(c("0 0 5 5", "5 5 10 10"))
bbm_to_bbx(matrix(c(0,0,5,5,5,5,10,10), nrow=2, byrow=TRUE))

coords_to_bbx(c(0,5,0,5),c(0,0,5,5),
               c(5,10,5,10), c(5,5,10,10))

dmi3kno/bbx documentation built on May 14, 2020, 9:08 p.m.