src/create_rois.py
def weighted_distance(p1, p2, weight):
    '''
    Weighted L2 distance where Y difference is multiplied by a weight. 
    We want discrepancies in Y to be magnified to be able to detect lines.
    '''
    import numpy as np
    d = np.sqrt(((p2[0] - p1[0]) ** 2) + ((weight * (p2[1] - p1[1])) ** 2))
    return d

    Weighted L2 distance where Y difference is multiplied by a weight. 
    We want discrepancies in Y to be magnified to be able to detect lines.
    
Weighted L2 distance where Y difference is multiplied by a weight.
We want discrepancies in Y to be magnified to be able to detect lines.
Weighted L2 distance where Y difference is multiplied by a weight . We want discrepancies in Y to be magnified to be able to detect lines .
def weighted_distance(p1, p2, weight):
    import numpy as np
    d = np.sqrt(((p2[0] - p1[0]) ** 2) + ((weight * (p2[1] - p1[1])) ** 2))
    return d
def weighted_distance ( p1 , p2 , weight ) : import numpy as np d = np . sqrt ( ( ( p2 [ 0 ] - p1 [ 0 ] ) ** 2 ) + ( ( weight * ( p2 [ 1 ] - p1 [ 1 ] ) ) ** 2 ) ) return d
Weighted L2 distance where Y difference is multiplied by a weight.
Weighted L2 distance where Y difference is multiplied by a weight .
'''
    Weighted L2 distance where Y difference is multiplied by a weight. 
    We want discrepancies in Y to be magnified to be able to detect lines.
    '''
p1
p2
weight