openbord透视图的变换

2024-09-30 01:29:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我想把Logo变成一个随机扭曲的Logo src_Logodst_Logo

img=inputimg
perspective = np.eye(3,dtype=np.float32) + np.random.uniform(-0.0015,0.0015,(3,3))
perspective[2][2] = 1.2
newimg = cv2.warpPerspective(img, perspective, (img.shape[1], img.shape[0]), borderValue=(255,255,255))

通过现在使用的方法,我注意到dst_logo有部分超出边界,也有部分无用的白色空白区域。有没有解决这个问题的可能办法?在


Tags: srcimgnprandomuniformcv2logoperspective

热门问题