(trans, uv)
return xy
Function:
    ----------
        apply affine transform 'trans' to uv
    Parameters:
    ----------
        @trans: 3x3 np.array
            transform matrix
        @uv: Kx2 np.array
            each row is a pair of coordinates (x, y)
    Returns:
    ----------
        @xy: Kx2 np.array
            each row is a pair of transformed coordinates (x, y)
Function:
    ----------
        apply affine transform 'trans' to uv
    Parameters:
    ----------
Function : ---------- apply affine transform trans to uv Parameters : ----------
def tformfwd(trans, uv):
    """
    Function:
    ----------
        apply affine transform 'trans' to uv
    Parameters:
    ----------
        @trans: 3x3 np.array
            transform matrix
        @uv: Kx2 np.array
            each row is a pair of coordinates (x, y)
    Returns:
    ----------
        @xy: Kx2 np.array
            each row is a pair of transformed coordinates (x, y)
    """
    uv = np.hstack((
        uv, np.ones((uv.shape[0], 1))
    ))
    xy = np.dot(uv, trans)
    xy = xy[:, 0:-1]
    return xy
def tformfwd ( trans , uv ) : uv = np . hstack ( ( uv , np . ones ( ( uv . shape [ 0 ] , 1 ) ) ) ) xy = np . dot ( uv , trans ) xy = xy [ : , 0 : - 1 ] return xy