If I want to detect perspective distorted objects (e.g rectangles) and calculate the correction transformation, what would be a good method?
For example, I have a lot of photos of papers lying on a flat surface (the photos are shot from an angle), and I want to correct the perspective and crop them.
I am thinking of using the OpenCv Python bindings to whip something up. I thought it would be a "standard problem" with lots of examples, but I failed to find any relevant info. Clues?
EDIT: I should add that I know it can be done by using some Web services, but I see this as a chance of doing something useful while learning OpenCv :)