def findExtremePoints(c):
    """ find all extreme points in a contour

    :param c: a contour
    :return:
        l: leftmost point
        r: rightmost point
        t: topmost point
        b: bottommost point
    """
    l = tuple(c[c[:, :, 0].argmin()][0])
    r = tuple(c[c[:, :, 0].argmax()][0])
    t = tuple(c[c[:, :, 1].argmin()][0])
    b = tuple(c[c[:, :, 1].argmax()][0])
    return l, r, t, b