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.
I am unable to figure out the activity in which changes are to be made to enable the saving of scanned images.