src/create_rois.py
def generate_centroids(regions):
    '''
    Generate centroids of the region bounding boxes. 

    Parameters:
                    regions (list): tuples of the form (y1,x1,y2,x2) representing the ROI bounding boxes
                    
            Returns:
                    centroids (list): list of tuples of the form (X, Y) with centroids (because I hate the original tuple coordinate ordering)
                                    
    '''
   
    centroids = []
    if regions != []:
        for region in regions:
            centroids.append(((region[1]+ region[3])/2, (region[0]+ region[2])/2))
    return centroids

    Generate centroids of the region bounding boxes. 

    Parameters:
                    regions (list): tuples of the form (y1,x1,y2,x2) representing the ROI bounding boxes
                    
            Returns:
                    centroids (list): list of tuples of the form (X, Y) with centroids (because I hate the original tuple coordinate ordering)
                                    
    
Generate centroids of the region bounding boxes.
Generate centroids of the region bounding boxes .
def generate_centroids(regions):
    centroids = []
    if regions != []:
        for region in regions:
            centroids.append(((region[1]+ region[3])/2, (region[0]+ region[2])/2))
    return centroids
def generate_centroids ( regions ) : centroids = [ ] if regions != [ ] : for region in regions : centroids . append ( ( ( region [ 1 ] + region [ 3 ] ) / 2 , ( region [ 0 ] + region [ 2 ] ) / 2 ) ) return centroids
Generate centroids of the region bounding boxes.
Generate centroids of the region bounding boxes .
'''
    Generate centroids of the region bounding boxes. 

    Parameters:
                    regions (list): tuples of the form (y1,x1,y2,x2) representing the ROI bounding boxes
                    
            Returns:
                    centroids (list): list of tuples of the form (X, Y) with centroids (because I hate the original tuple coordinate ordering)
                                    
    '''
regions
tuples of the form (y1,x1,y2,x2) representing the ROI bounding boxes
Returns.
tuples of the form ( y1 x1 y2 x2 ) representing the ROI bounding boxes Returns .
centroids
list of tuples of the form (X, Y) with centroids (because I hate the original tuple coordinate ordering)
list of tuples of the form ( X Y ) with centroids ( because I hate the original tuple coordinate ordering )