How to de-skew a text image also retrieve the new bounding box of that image?
问题 Here's a receipt image that I've got and I've plotted it using matplotlib and If you see the image the text in it is not straight. How can I de-skew and fix it? from skimage import io import cv2 # x1, y1, x2, y2, x3, y3, x4, y4 bbox_coords = [[20, 68], [336, 68], [336, 100], [20, 100]] image = io.imread('https://i.ibb.co/3WCsVBc/test.jpg') gray = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY) fig, ax = plt.subplots(figsize=(20, 20)) ax.imshow(gray, cmap='Greys_r') # for plotting bounding box