Slashdot Mirror


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?"

34 of 172 comments (clear)

  1. Snapter by brusk · · Score: 4, Informative

    Snapter is a bit cumbersome but that's what it does.

    --
    .sig withheld by request
    1. Re:Snapter by DingerX · · Score: 2, Informative

      Okay, as per my previous post, I'm trying Snapter. It might have crashed, for alll I know. I'm at 3 bars (out of about 20) on the left side of the first page, and one processor is pegged. We'll see if it comes out.

    2. Re:Snapter by DingerX · · Score: 3, Informative

      restarted. 30 minutes later, it threw a fatal exception.

      My short review: FAIL.

    3. Re:Snapter by brusk · · Score: 3, Informative

      I include that in my definition of cumbersome.

      --
      .sig withheld by request
    4. Re:Snapter by crath · · Score: 2, Interesting

      I trialed the software using files from a Pentax istDS (6 megapixel) DSLR, and since it worked quite well I purchased a copy. However, when I attempted to use it with files from a D700 (12 megapixel), it failed completely. So, I would only recommend it for 6 mp resolution files or less.

      Also, Snapter hasn't released a new version in over a year; so, it's almost abandonware---it's not possible that they haven't received a bug report or two that needed to be fixed, over the past 12 months.

      Net conclusion: try the demo with the actual files you plan to convert. If it works, great; if, not, don't buy it. If your files are >6mp in resolution; don't bother even toying with it.

    5. Re:Snapter by DingerX · · Score: 4, Informative

      Okay Cool. I found out what my problem was:

      1. The book must be on a uniform surface.
      2. All the edges of the book must be in the frame.
      3. Only hold the book down from the side.
      4. The photograph must be taken directly over the book.
      5. Use a dSLR for best results.

      Okay, so now try holding a dSLR directly over an open book that you're holding with another hand, from the side, and at a range where the entire book fits in the frame. At that point, you might as well build that book scanning rig.

      In short: FAIL.

  2. Anonymous Coward by Anonymous Coward · · Score: 4, Informative

    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.

    1. Re:Anonymous Coward by polymeris · · Score: 3, Informative

      Also use a zoom lens and take the shot from as far as possible, to reduce curvature. The longer the focal distance, the flatter the picture will appear.

    2. Re:Anonymous Coward by Yvan256 · · Score: 4, Funny

      Also, avoid being seen by the bookstore clerks.

    3. Re:Anonymous Coward by Anonymous Coward · · Score: 2, Informative

      It doesn't have to be glass. Target stores have these nice plexiglass photo boxes. An advantage of them over glass is that the edge of the box helps hold the opposing page up.

    4. Re:Anonymous Coward by Anonymous Coward · · Score: 2, Informative

      That's not what polymeris is getting at. Wide angle lenses create strong perspective foreshortening. That's why there is a sweet spot for portrait photography: too wide makes noses look big, too long leaves no perspective. Lens distortion is easily removed because it is inherent to the lens, so you only need to calibrate once and can use the profile for all pictures shot at the same focal length. Perspective distortion depends on the scene, so there is no "calibrate once, correct all" option without creating a repeatable setup.

    5. Re:Anonymous Coward by jonbryce · · Score: 2, Informative

      Barrel distortion can be easily fixed in photoshop, and once you get the right settings for your first pic, you can batch process the rest of them.

    6. Re:Anonymous Coward by Hadlock · · Score: 2, Interesting

      If you're doing fixed height/lighting camera photography, you might as well just buy a cheapo screw mount macro lens + screw mount adapter.

      --
      moox. for a new generation.
  3. Re:sooo.... by Anonymous Coward · · Score: 2, Funny

    Aye, this Ask Slashdot sounds more like "Doctor, it hurts whenever I do this." The traditional response to such nonsense is, "well, then don't do that!"

    Next question?

  4. Contact Scan Tailor Author? by syousef · · Score: 4, Insightful

    At version 0.9.6, perhaps Scan Tailor is 96% of what you want and it's F/OSS. If you *politely* contact the author(s) and lay out your concerns perhaps you can get what you need AND help make a project better. Worth a try.

    --
    These posts express my own personal views, not those of my employer
  5. ahhh - book scanning by ZERO1ZERO · · Score: 3, Informative
    As with most scanning and other things, you can save your self immense amounts of hassle time and money later, by spending a fraction of that time up front sorting out the 'input'. A bit of glass over the book, using a scanner, or even getting a friend to hold a book will mean that your source image will be much better to start with.

    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.

  6. Re:sooo.... by Yvan256 · · Score: 4, Funny

    He can easily get his tiny 10 megapixels camera into the book store, but he would be stopped immediately if he tried to bring his scanner instead.

  7. Look at some Google books by frovingslosh · · Score: 3, Insightful

    I remember reading about Google's technique of converting books to e-books

    My suggestion is that you look at some of the Google books that are on-line. I have, and they show the problems that you mention and more, curved pages, dark areas, and even text that is distorted and harder to read than most captchas. Whatever you have read (and yea, I remember reading it too), it doesn't seem to actually be viable in practice. Sure, photographs are easier than scanning, particularly if you do it fast and cheap, but the result is poorer. If you can scan the book without damaging them I suggest you go back and do that.

    --
    I'm an American. I love this country and the freedoms that we used to have.
  8. Casio Exilim digital cameras built-in mode by AwaxSlashdot · · Score: 3, Interesting

    Digital cameras from Casio (Exilim serie) have a dedicated to take picture of sheets of paper, whiteboards and visit cards. It detects the content boundaries, crops and unskew it. You could also save time (and money since time = money) by looking for and buying the electronic version of the book you want to read.

    --
    Sig (appended to the end of comments you post, 120 chars)
  9. Use a homemade book scanner. by s4m7 · · Score: 4, Informative

    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.
  10. Hugin could help by Graemee · · Score: 4, Interesting

    http://hugin.sourceforge.net/tutorials/scans/en.shtml Here's a tutorial to stitch scans together the slight curve of the page is minimized where the scan joins. Might be what you are looking for.

  11. Re:Depending on the book of course... by Anonymous Coward · · Score: 2, Funny

    Cut the spine off and run the pages through a scanner's page feeder... OCR if desired, then enjoy...

    I'm surprised that Google doesn't do this, it would be SO much faster than scanning each page one at a time.


    Yeah, I don't see why they don't just slice the spine off that one-of-a-kind 16th century book so they can scan it in. That's such an easier way to do it. And I have NO idea why a library would have an issue with that.



    Are people around here really this dumb?

  12. Here you go by arndawg · · Score: 2, Funny
  13. Allow me to extract the informative part of this.. by plasmacutter · · Score: 2, Insightful

    Unpaper may work for you if you're not afraid to deal with a CLI.

    There's no harm in giving it a look. Assuming it's properly designed I can see it being quite elegant.

    --
    VLC FOR MAC IS DYING! IF YOU DEVELOP, PLEASE SAVE IT!!
  14. How about a $300 home-built scanner? by plover · · Score: 5, Informative

    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
    1. Re:How about a $300 home-built scanner? by MisterSquid · · Score: 2, Interesting

      Something the narrator in the bookscanner video said at the end of his video really resonates with me, which is that

      powerful tools invariable have powerful effects. If everyone had a book scanner in their home, it might force the publishing industry to rethink an obviously broken business model.

      Lately, I've been posting like crazy about digital print and related topics such as the conversion of paper print to digital audio. Google started their project several years back and publishers are suing to stop the threat to the paper print business model represented by a millions-of-volumes digital book corpus. If these publishers (copyright holders) are successful, it won't be too long before efforts such as the one depicted in the Instructables video are multiplied on a mass scale, what Clay Shirky calls the mass amateurization of a formerly professional field (book publishing).

      My best guess is that media incumbents will not adapt, and that what happened to the music industry will happen to all media incumbents. It's not that publishers can't change, but rather something about their culture, their collective belief in entitlement and the "rightness" of legacy media structures prevent them from pioneering the transition.

      You can't say we didn't try.

      --
      blog
  15. Re:What does "and patented" have to do with it? by Dachannien · · Score: 3, Informative

    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.

  16. I want I want by ethicalBob · · Score: 2, Insightful

    I want a solution to my problem that lets me be incredibly lazy, so I don't have to scan the books in (which i know will work VERY well if I just take the time to do it)...

    I want software that will do it. For free.

    Can I do it without a camera, too?

    Actually I'd like it if there were some way I could get paid for using the software.

    Can i just put my iPhone/PDA on the book and have it all sucked in via osmosis?

    and then have the book read back to me w/ Morgan Freeman as the narrator?

    Is there software that will turn the pages for me too? Oh wait - Morgan is going to narrate for me, that's right...

    (sigh)

    I know I'm probably getting modded Troll for this one; but there isn't always always an easy (magic!) software solution for every little thing. Sometimes you still have to put the work in if you want quality.

    --
    Politics will sooner or later make fools of everybody... - Dick Armey
    1. Re:I want I want by LihTox · · Score: 4, Insightful

      It never hurts to ask; if there were an easy magic software solution to do X, wouldn't you rather find out about it now, instead of after doing X?

    2. Re:I want I want by Odinlake · · Score: 2, Insightful

      This guy didn't ask for 'magic' but for software to perform a conceptually simple task. He got two or three concrete examples above. There are nuttier posts on /. you can go and make fun of.

  17. Try a heavy piece of non-glare glass by KharmaWidow · · Score: 2, Insightful

    Try a heavy piece of non-glare glass

  18. Try using one of the Planon Pen Scanners by ArcticBirdman · · Score: 2, Interesting

    I went out and got one of the Planon Pen Scanners. Depending on what you want, they can go all the way to 600 dpi in color. Check out their web site. You can also get bargains on refurbished earlier models if you only need B&W and up to 200 dpi. http://www.planonstore.com/SearchResults.asp

  19. QT3 by gd2shoe · · Score: 2, Informative

    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.
  20. Re:a nifty new program by Taxman415a · · Score: 2, Informative

    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.