def improfile(img, x, y, n):
    xm = x[0]
    x0 = x[1]
    ym = y[0]
    y0 = y[1]
    a = np.arctan(((y0 - ym) / (x0 - xm)))
    i = range(0, 100, int((100 / n)))
    cx = np.squeeze(np.zeros((1, len(i))))
    cy = np.squeeze(np.zeros((1, len(i))))
    c = np.squeeze(np.zeros((1, len(i))))
    ct = 0
    for t in range(0, 100, int((100 / 30))):
        tf = (t / 100.0)
        cx[ct] = int((xm + ((x0 - xm) * tf)))
        cy[ct] = int((ym + ((y0 - ym) * tf)))
        c[ct] = img[(int(cy[ct]), int(cx[ct]))]
        ct = (ct + 1)
    return (c, cx, cy)
def improfile(img, x, y, n):
    xm = x[0]
    x0 = x[1]
    ym = y[0]
    y0 = y[1]
    a = np.arctan(((y0 - ym) / (x0 - xm)))
    i = range(0, 100, int((100 / n)))
    cx = np.squeeze(np.zeros((1, len(i))))
    cy = np.squeeze(np.zeros((1, len(i))))
    c = np.squeeze(np.zeros((1, len(i))))
    ct = 0
    for t in range(0, 100, int((100 / 30))):
        tf = (t / 100.0)
        cx[ct] = int((xm + ((x0 - xm) * tf)))
        cy[ct] = int((ym + ((y0 - ym) * tf)))
        c[ct] = img[(int(cy[ct]), int(cx[ct]))]
        ct = (ct + 1)
    return (c, cx, cy)