Software To Flatten a Photographed Book?
davidy writes "I have photographed some pages of a book for reading on my PDA. This is much faster than scanning and I don't have to carry the heavy books. However, the photographed books are not as nice: curved, skewed, and shadowed, as opposed to the much flatter, cleaner scanned books. I have searched for software that can flatten the pages for better reading on the PDA. So far I have come across Unpaper and Scan Tailor. Unpaper doesn't seem to have a windows GUI, and Scan Tailor doesn't unskew well. I remember reading about Google's technique of converting books to e-books with a camera and a laser overlay. Is there any home user software that can do a similar job without the need for a laser overlay or other sophisticated (and patented) technology?"
Snapter is a bit cumbersome but that's what it does.
.sig withheld by request
Get a thick, heavy piece of glass and lay it atop the pages to flatten them out before you photograph them. Use ambient light and avoid the flash.
Not everyone has 5-10mm thick peices of book sized glass lying around and it can be hard to take that sort of thing about the place in case of requiring to photo a book.
There is software called Book restorer that does this removes curves 'geometrical correction' etc but it's pricy.
i've tried un paper and it's pretty decent for what it does but it does have some limitations and it's not the most convenient to use.
Deskewing, cropping, filling, etc etc are all easily done and I've even written imagemagick batch scripts in windows to do these things. The major trick is the curve removal.
There's various ways you can determine the curve from a scanned image. If you have the edge of the page, you can calculate the movement required to straighten that, and then apply it to the whole image. You can use text based curve removal, similar to well known deskew algorithms for text, but takes into account different parts of the text may be 'more' skewed. i.e. rather than a rotational deskew a 'sliced' deskew. This needs to be done from the top to the middle and the bottom to the middle.
If you have a good 'shape' of the page, and know the true size of the page, you can use a kind of morph operator to morph the corners back to th eright position and hope the image follows.
Using a Greyscale/colour source will work better than a black and white source image in general.
the other option is if the scanned / photoed page is actually of reasonaly good quality but if just a bit squint, then OCR it to a PDF and generate a new document using the OCR text, which will be pin sharp accurate, compress a lot better and be easier to use, although may not be ideal if there are too many errors.
Seriously, have you ever compared the time photographing a book vs. scanning it? The fastest scanners run like photocopiers. With a book, all you need is to set up a decent or ghetto rig for the camera and turn the pages. Until now, I've been shooting with a DSLR at the same lighting/camera settings for each shot, and applying a batch transform process followed by a universal levels setting, finishing up with a PDF assembly. But I'll report back on how Snapter works on the same files.
Exactly, the document scanners used in libraries and archives are pretty much high resolution cameras on an adjustable stand. They don't work like flatbed desktop scanners where you have to squash the book flat on a plate of glass. As a result they are much faster, easier on the books and you get better quality scans for OCR processing.
If you have ~$300 to drop on the project, Make has plans for a nice book scanner: http://blog.makezine.com/archive/2009/04/how-to_book_scanner_on_the_cheap.html It seems to hold the pages at an angle so there's little-to-no distortion on the page.
This comment is fully compliant with RFC 527.
Whoo, Mod +1 Funny!
Any time I've ever done that I've either gotten crickets or flames.
Some guy posted a great instructables on building your own high speed book scanner, purposely designed to rapidly photograph book pages without curves. He even includes a software stream that OCRs the contents and sticks them into PDFs.
It's been quite popular -- so much so that he's created an online forum at http://www.diybookscanner.org/ dedicated to discussions from DIY book scanners all over the place, where they talk about builds, parts, and software.
I've been very tempted to build one myself just to avoid carrying heavy books around in my backpack.
John
Really, if you are doing this for yourself and have no intention of selling your product, then you are free to use their method all you want.
35 U.S.C. 271 (a) Except as otherwise provided in this title, whoever without authority makes, uses, offers to sell, or sells any patented invention, within the United States, or imports into the United States any patented invention during the term of the patent therefor, infringes the patent.
Yes, it's extremely unlikely that anyone would ever sue you for infringing a patent in the privacy of your own home because the damages would be minuscule and it would be very difficult to prove infringement, but it's still an infringement.
Or, you know, if you find that there is a Linux only app that is exactly what you're looking for, you could just use Linux for it. Many of us are stuck with a Windows box, partition, or VM for the same reason. With Linux you can even run it off a CD or USB drive.
No need. At a quick glance, Scan Tailor is programmed in QT3 (a superset of C++, used by KDE). This is a multi-platform environment, making it very easy to fix something on all supported platforms at once. If unskew doesn't work well, then that should be addressed in both versions. Fixing the Linux version will fix the Windows version too (unless he's relying on platform specific libraries in addition to QT).
I won't join Slashcott. OTOH, If Beta goes live, I just won't be back until it's fixed. Sorry Dice.
Basically you look up the internal command names such as file-jpeg-save and what arguments it takes then program either a plugin for gimp or a non interactive script. You can do it in scheme which they refer to as script-fu, or you can write them in python and it's called python-fu. The former is lightly documented and the latter barely at all. The only way I've found to look up all the command names for the python interface is to run gimp, then go to filters -> python-fu -> console then hit the browse button. But yeah basically it's either learn to program in scheme or python at this point.