src/create_rois.py
def merge_regions(region,other):
    '''
    Simple magic code that generates a bounding box that is the union of two bounding boxes.
    '''
    y1 = min(region[0],other[0])
    x1 = min(region[1], other[1])
    y2 = max(region[2], other[2])
    x2 = max(region[3], other[3])
    
    return (y1,x1,y2,x2)

    Simple magic code that generates a bounding box that is the union of two bounding boxes.
    
Simple magic code that generates a bounding box that is the union of two bounding boxes.
Simple magic code that generates a bounding box that is the union of two bounding boxes .
def merge_regions(region,other):
    y1 = min(region[0],other[0])
    x1 = min(region[1], other[1])
    y2 = max(region[2], other[2])
    x2 = max(region[3], other[3])
    return (y1,x1,y2,x2)
def merge_regions ( region , other ) : y1 = min ( region [ 0 ] , other [ 0 ] ) x1 = min ( region [ 1 ] , other [ 1 ] ) y2 = max ( region [ 2 ] , other [ 2 ] ) x2 = max ( region [ 3 ] , other [ 3 ] ) return ( y1 , x1 , y2 , x2 )
Simple magic code that generates a bounding box that is the union of two bounding boxes.
Simple magic code that generates a bounding box that is the union of two bounding boxes .
'''
    Simple magic code that generates a bounding box that is the union of two bounding boxes.
    '''
region
other