Have you ever got worried when you’ve not been able to find a bill or post-it note that you really needed? Well with this Raspberry Pi Document Scanner now you won’t have to! All your notes, receipts and documents will now be a click away safely stored in your Dropbox folder.
The final scanned image is saved with a filename that has the day,month,year and minute of the moment the image was taken. For example : sc_Wed_08_06_2016_10.png (implying the image was taken on Wednesday, 8th June 2016). This prevents overwriting of an image as they will not have the same name.
I have made an Instructables post with the full build instructions for this project.
The code uses the Python os library in order to run terminal commands using a Python script. The basic working of the code is:
- Takes the image.
- Identifies the Edges in the image.
- Detects the contours of the document.
- Applies a perspective transform to properly orient the document.
- Saves the output in the /document-scanner directory.
- Uploads the scanned image to the Dropbox folder.
The outputs of each stage of the image processing can be seen here:
1.Original image taken by the Raspberry Pi Camera Module
4.Final Scanned Output
Here is an additional image of a scanned copy of a bill:
Here’s a video walk through showing the execution of the code:
P.S. I’ve also entered this project in the Instructables Automation Contest so if you’ve liked this project and found it useful please consider voting here.