def projective_transform_by_points(x, src, dst, map_args={}, output_shape=None, order=1, mode='constant', cval=0.0, clip=True, preserve_range=False):
 if (type(src) is list):
  src = np.array(src)
 if (type(dst) is list):
  dst = np.array(dst)
 if (np.max(x) > 1):
  x = (x / 255)
 m = transform.ProjectiveTransform()
 m.estimate(dst, src)
 warped = transform.warp(x, m, map_args=map_args, output_shape=output_shape, order=order, mode=mode, cval=cval, clip=clip, preserve_range=preserve_range)
 return warped

def projective_transform_by_points ( x , src , dst , map_args = { } , output_shape = None , order = 1 , mode = 'constant' , cval = 0.0 , clip = True , preserve_range = False ) : if ( type ( src ) is list ) : src = np . array ( src ) if ( type ( dst ) is list ) : dst = np . array ( dst ) if ( np . max ( x ) > 1 ) : x = ( x / 255 ) m = transform . ProjectiveTransform ( ) m . estimate ( dst , src ) warped = transform . warp ( x , m , map_args = map_args , output_shape = output_shape , order = order , mode = mode , cval = cval , clip = clip , preserve_range = preserve_range ) return warped
projective transform by given coordinates .