src/create_rois.py
def check_aspect_ratio(region, threshold):
    '''
    Simple binary check to see whether a bounding box exceeds a threshold aspect ratio. True means ROI is very elongated.
    '''
    bbox = region
    ratio = (bbox[2]-bbox[0])/(bbox[3]-bbox[1])
    if ratio > threshold or ratio < (1/threshold):
        return True

    Simple binary check to see whether a bounding box exceeds a threshold aspect ratio. True means ROI is very elongated.
    
Simple binary check to see whether a bounding box exceeds a threshold aspect ratio. True means ROI is very elongated.
Simple binary check to see whether a bounding box exceeds a threshold aspect ratio . True means ROI is very elongated .
def check_aspect_ratio(region, threshold):
    bbox = region
    ratio = (bbox[2]-bbox[0])/(bbox[3]-bbox[1])
    if ratio > threshold or ratio < (1/threshold):
        return True
def check_aspect_ratio ( region , threshold ) : bbox = region ratio = ( bbox [ 2 ] - bbox [ 0 ] ) / ( bbox [ 3 ] - bbox [ 1 ] ) if ratio > threshold or ratio < ( 1 / threshold ) : return True
Simple binary check to see whether a bounding box exceeds a threshold aspect ratio.
Simple binary check to see whether a bounding box exceeds a threshold aspect ratio .
'''
    Simple binary check to see whether a bounding box exceeds a threshold aspect ratio. True means ROI is very elongated.
    '''
region
threshold