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!