pub fn instance_overlap(
inst1: &InstanceMask,
inst2: &InstanceMask,
) -> Result<bool>Expand description
Check whether two instance masks overlap (share at least one foreground pixel).
Returns an error if the masks have different spatial dimensions.