All software that I found (esp. the many Android apps developed for this purpose) use the webcam by taking a single picture and improving it digitally to be a "scan". This however leads to low resolutions. A better way is to use several pictures and stitch them together. This would be possible most comfortably with a dedicated software for documents from webcams, but that does not seem to exist so far. As an intermediate solution, let's use normal panorama software for this purpose.
Alternative 1: Panorama from images
My propsed scenario looks like this now, but I haven't tested or implemented it further so far:
- Add lighting. Add a light source that will illuminate the piece of your document that each webcam photo will cover. Such as a clipping a USB flashlight to the upper display edge of a notebook.
- Add your page on a stiff "background template" with markers for photo areas. Usually, one would scan A4 pages, so partitioning it in A7 elements and marking them on the "template" along the edges of the A4 page that you add in the middle will result in the option to take 8 photos per A4 page in a way that allows you to select the proper area for each, as each A7 section has an edge in common with the A4 page. 8 images at (say) 2 MPx webcam resolution results in 16 MPx per scan, which is more than enough.
- Create images. You would have a viewfinder with live video, hold up your page so that the next A7 section fits into the viewfinder, and click a key to shoot the next image. Ideally, the viewfinder should have an on-screen display showing a somewhat smaller rectangle for placing the A7 area in, as the edges will then be used for overlap finding when stitching the images together.
- Get the images stitched together. This should be a fully automated process and is possible with one of the many "panorama maker" software applications out there. Some are available for Linux.
Alternative 2: Panorama from video
This is what I tried at first: creating a panning video of your document, grabbing it with the webcam, and using video-to-panorama software to create a high-resolution image from it. However I now think that there are inherent quality limitations, as panning video images are never as sharp as still images since the objects are in motion. However, for other purposes this is a worthwhile technique, and I explored it in its own blog post "How to create a panorama from video under Linux?".
Leave a Reply