Skip to contents

Checks if two bounding boxes overlap or calculates the percent overlap of the combined areas (intersection over union).

Usage

bbox_intersect(bbox1, bbox2, format = "xywh", return_as = "logical")

Arguments

bbox1, bbox2

character vector. Bounding boxes to compare.

format

character. Format of provided bounding boxes. See bbox_convert().

return_as

character. "logical" to return a logical value of if the bounding boxes intersect or "percent" to get intersection over union (% overlap of total area) as a value between 0 and 1.

Value

logical or numeric between 0 and 1.