I am looking for recommendations for a somewhat intelligent image processing library. My use case: I will scan multiple physical paper forms. I want to intelligently identify the edges of the form (because scans are not always perfectly aligned) and then segment parts of the form. The segmenting part should be quite easy since I know where exactly in the form my subsection is (basically all forms are the same but not all scans are aligned). I need help with a library (maybe OpenCV?) for identifying the form itself in the scan.

Here is an example: say I have a scan like this https://www.formassembly.com/content/uploads/2015/03/paper-screen.png. I would like to automatically detect the corners, align the image and remove the padding (so the corners of the form box are the corners of my image).

Any suggestions are welcome. Thank you!

1 Answer 1


The term is "de-skew" or "deskew".

A cursory Internet search lists several products and projects.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.