footprint_iou#
- scarlet2.detect.footprint_iou(source1, source2)[source]#
Compute intersection over union (IoU) between two source footprints.
- Parameters:
source1 (
HierarchicalFootprint) – Sources with a .bbox (Box) and .footprint (boolean ndarray sized to that bbox).source2 (
HierarchicalFootprint) – Sources with a .bbox (Box) and .footprint (boolean ndarray sized to that bbox).
- Returns:
iou – IoU in
[0, 1]. Returns0if the bounding boxes do not overlap.- Return type:
float