The following picture will illustrate what i want.
Image contain 4 reference rectangle which is base for image deskewing. Assume, Image contain some other information like text, circle and rectangle. Now, I want to write a script to straighten the image based on four rectangle.my resultant image should be straighten. So i can extract some information after deskewing it. I am using OpenCV python, please tell me a way to accomplish this. Kindly show some code as examples of OpenCV Python.enter image description here after that it must be like enter image description here