ScanLibrary is an android document scanning library built on top of OpenCV, using the app you will be able to select the exact edges and crop the document accordingly from the selected 4 edges and change the perspective transformation of the cropped image.
For everyone stuggling on how to use this library, I created an example project at
https://github.com/fpiraneo/PhoneScanner/
It would be nice if anyone update the documentation and the project: It seems no longer maintained. Thanx!