Scan the document in a photo. Followed the tutorial How to Build a Kick-Ass Mobile Document Scanner in Just 5 Minutes
The application has large limit that the background should be very simple, and very different (color) from the document you want to scan.
scikit-image
imutils
opencv (can be installed using pip install opencv-contrib-python
)
python scanner.py -i "<img_path>"