I am trying to transform an image such that straight lines/boxes become curvy.
Unfortunately I am only able to change the perspective of the images using Affine transformations. Which only makes line non-parallel if they were parallel before, the lines remain straight. I do not know which functions can bring curvy transformations.
hz_error,vert_error = 10,5
w,h,_=img.shape
src = np.float32([(0,0),(w,0),(w,h),(0,h)])
dst = np.float32([(-hz_error,-vert_error),(w+hz_error,-vert_error),(w-hz_error,h+vert_error),(0,h)])
M = cv2.getPerspectiveTransform(src, dst)
warped = cv2.warpPerspective(img, M, (w+20, h+20))
The input image
The output image
The output that I require should be a curvy image.
An example desirable output,
Here the edges are "curvy" rather than straight.