def points2contour(points):
    """
    Convert points to contours. (pts2cnt)

    :param points: array of points ([x,y] for openCV, [y,x] for numpy)
    :return:

    Example::

        points = np.array([[0, 0], [1, 0]]) # points
        contours = points2contour(points)
        print contours # np.array([[[0, 0]], [[1, 0]]])
    """
    return points.reshape(-1, 1, 2)