0

I want to transform the Logo to a random distorted 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))

By the method used now, I noticed that the dst_logo has parts out of the border, and there also exists parts of useless white empty region. Is there any possible solution to solve the problem?

  • 1
    transform the bounding rect first and adjust the destination matrix size + destination position. – Micka Apr 19 '18 at 05:16
  • 2
    have a look at my answer in https://stackoverflow.com/questions/16587274/opencv-2-4-3-warpperspective-with-reversed-homography-on-a-cropped-image/24425764#24425764 – Micka Apr 19 '18 at 05:35

0 Answers0