def points_to_vec(pt1, pt2, flip=False):
    """
    Converts the coordinate of two points (pt1 > pt2) to a vector

    flip: bool, default = False
        If the coordinate system should be flipped such that higher y-coords
        are lower (e.g. needed when working with images in opencv).
    """
    vx = pt2[0] - pt1[0]
    vy = pt1[1] - pt2[1] if flip else pt2[1] - pt1[1]
    return vx, vy
