Deep Learning - SG segmentation/FCN-DenseNet inference/lineintersect.py
def isPointOnLine(a,b,c):
    '''
    Check if a point is on a line.
    '''
    # move to origin
    aTmp = (0,0)
    bTmp = (b[0] - a[0], b[1] - a[1])
    cTmp = (c[0] - a[0], c[1] - a[1])
    r = np.cross(bTmp, cTmp)
    return np.abs(r) < 0.0000000001

    Check if a point is on a line.
    
Check if a point is on a line.
Check if a point is on a line .
def isPointOnLine(a,b,c):
    aTmp = (0,0)
    bTmp = (b[0] - a[0], b[1] - a[1])
    cTmp = (c[0] - a[0], c[1] - a[1])
    r = np.cross(bTmp, cTmp)
    return np.abs(r) < 0.0000000001
def isPointOnLine ( a , b , c ) : aTmp = ( 0 , 0 ) bTmp = ( b [ 0 ] - a [ 0 ] , b [ 1 ] - a [ 1 ] ) cTmp = ( c [ 0 ] - a [ 0 ] , c [ 1 ] - a [ 1 ] ) r = np . cross ( bTmp , cTmp ) return np . abs ( r ) < 0.0000000001
Check if a point is on a line.
Check if a point is on a line .
'''
    Check if a point is on a line.
    ''' # move to origin
a
b
c