def rectangle_intersection(a, b):
    """Computes intersection between two rectangles. Allows to check quickly if two bounding boxes overlap."""
    x = max(a[0], b[0])
    y = max(a[1], b[1])
    w = min(a[0] + a[2], b[0] + b[2]) - x
    h = min(a[1] + a[3], b[1] + b[3]) - y
    if w < 0 or h < 0:
        return None
    else:
        return (x, y, w, h)