Raspberry Pi Document Scanner with Automated Upload to Dropbox!

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.

Have a look at the video walk-through/demo of the project linked below. I made this project by using this Pyimagesearch post and Dropbox-Uploader script.

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


2.Edge Detection




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.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: