Is there any way that I can straighten this image using OpenCV with Python? I was figuring it out using the different transformations but I cant get it.
Here is my code:
rows, cols, h = img.shape
M = np.float32([[1, 0, 100], [0, 1, 50]])
And then I apply Affine Transformation.
dst = cv2.warpAffine(roi, M, (cols, rows))
Still I cant get the desired output of the image to be straighten. Scratching my head for almost an hour now. Anyone can help me please?