offlinemot.utils_.find_overlap

offlinemot.utils_.find_overlap(box1, box2)[source]

Find the area of intersection between two boxes

Parameters
  • box1 (list) – A list of [x,y,width,height] where x,y in the top-left point coordinates of the first box

  • box2 (list) – A list of [x,y,width,height] where x,y in the top-left point coordinates of the second box

Returns

The area of the intersection between the two boxes

Return type

int

Examples

>>> find_overlap([0,0,10,5],[0,0,5,10])
 25