mapping = np.array([[v_x[0], v_y[0], s_x], [v_x[1], v_y[1], s_y]])
return cv2.warpAffine(image, mapping, (width, height), flags=cv2.
    WARP_INVERSE_MAP, borderMode=cv2.BORDER_REPLICATE)
How to straighten a rotated rectangle area of an image using opencv in python?