I need to process some of the information obtained from the scanner. The problem is the image I get occasionally rotated. I decided to add a few special objects on the photo to be able to use with technical Features2D + Homography to find that object. I think after finding special objects I could rotate the image back to its original position (with warpPerspective?). Here is an example:
The rotated image, I know that under the black-box there is some text, I need that area for OCR function:
I'm stuck after finding the black-box.I think I'll use the warpPerspective to rotate it, but how to find out the 3x3 transformation matrix?
Thanks.