How can I scan multiple photos at once

8,562

Solution 1

The software prostprocessing function you are looking for is called image segmentation. At least under Linux, I don't know a proper solution so far. (There is the proof-of-concept segment_image script based on ImageMagick though – see also.)

When you freely place your photos on the scanner, you would need automatic segmentation and deskewing, and both seem to be hard with available free software resp. often require manual postprocessing. In addition, many scanners have the annoying property that the (0,0) pixel is some millimeters off the corner of the glas, leading to cropping when placing photos right at the edge.

So how about this:

Proposed alternative: Scanning with templates, splitting with Image Magick

  1. Build some cardboard templates with cutouts for several photos, to place on the scanner glas. Some hints:

    • Position the template on the scanner glas so it can't move, taping it to one edge if needed.
    • Since your photos will be of a few standard sizes, a few templates will be enough.
    • Create templates so as to maximize coverage with photos. This may mean rotating them by 90 degrees (to be auto-corrected by scanning commands below) and combining photos of different sizes.
    • The area covered by photos should be rectangular, with as little space within it that is not covered by photos. Because scanning that space will waste time later.
  2. Define the area to scan. It should be the rectangular area containing all your photos. To get its offsets and size, for example use XSane to create a preview, select a scan area and look up the values in "Window → Show advanced options".

  3. Batch-scan the photo collages. You want to save each photo collage as one big image file each, but scan multiple such collages in a batch process. For Linux, I like scanimage with the --batch option for this – you just press Enter to acquire and save the next scan. Use scanimage -A to find the device-specific options to limit your scan area, and set them to the values determined in the last step.

  4. Split the photo collages into individual images. Use ImageMagick for that, rotating images where needed. On Linux, a small shell script can do that for all images scanned with the same cardboard template. Like this one, processing files named collage-001.jpg, collage-002.jpg etc.: (careful, untested!)

    for file in collage-*.jpg; do
      convert "$file" \
        -crop '1000x1500+0+0' -rotate 90 +write ${file/.jpg/.img1.jpg} \
        -crop '1000x1500+1000+0' -rotate 90 +write ${file/.jpg/.img2.jpg} \
        null:;
    done
    

    Sources: this answer, which additionally has a technique for images not fitting into memory; this post to explain null:; docs for -crop, -rotate and +write.

Another alternative: XSane batch scans. I also tried using XSane's batch scan feature. It allows to define multiple scan areas per page (see "Window → Show batch scan"), incl. rotation options per scan area. So you can create (and even save) one scan area definition set for each cardboard template, and press "Scan batch list" to get your multiple images from the template. However, for a large set of images this is much slower because the scanner will move back to the zero position after processing one scan area. (At least that happens with my scanner. Don't know if there are scanners where SANE features can avoid this return-to-zero step, but I doubt it.)

Solution 2

Many scanners and all in one devices have this feature. I don't want to make shopping suggestions but a quick search at Epson, Kodak (is still around) and HP as a start might give you a direction. You can usually put several pictures on a flatbed and the software sorts out individual images. There are also some units that have a document feeder

It seems there are several software options as noted in comments. Photoshop will allow you to scan several photos and then separate. This Photoshop scanning link explains in more detail. Added benefit that Photoshop is a great too to work with the images separately as well. Photoshop Elements sems to have a similar function and a lower cost Elements

There are sure to be many other solutions

Share:
8,562

Related videos on Youtube

uSlackr
Author by

uSlackr

IT Director by day, tech enthusiast, homebrewer, dad, husband, etc by night. Things I use: slackware,Linux, Windows, windows phone, VirtualBox, Tiki, AD, Subsonic, Amahi, Powershell, and more. Things I'm learning: iOS programming; PowerShell Find my tech blog [tiki.gmartin.org][1] [1]: http://tiki.gmartin.org

Updated on September 18, 2022

Comments

  • uSlackr
    uSlackr over 1 year

    Like many of us, I have thousands of pictures that I'd like to scan. I've been thinking through the process of doing this and see an immense task. One of the pain points I've identified is the need to place each picture individually on the glass for scanning.
    It has me wondering whether there is any open source software that will, given a scan of multiple pictures, automatically identify the individual photos and offer to save them separately. I currently have an HP Photosmart printer/scanner and would like to make use if it if possible.

    • sean christe
      sean christe about 12 years
      I'm not going to put it as an answer since I have never used it, but 30 seconds on google explained that it is often a function of the scanner and produced a link to this software: ransen.com/ransenscan/Testimonials-RansenScan.htm
    • Sirex
      Sirex about 12 years
      i'd imagine it'd be alot easier to just send the photos off to one of the many many companies that offer large scale scanning operations for practically pennies.
    • uSlackr
      uSlackr about 12 years
      I already have a scanner - an HP photosmart that is nice but have no such feature. So I'm looking for something "aftermarket".
    • Sirex
      Sirex about 12 years
      perhaps, but it really is way way easier to just do it that way as a once off. I'm working on the assumption that in this day and age any future photos will be digital, mind.
    • uSlackr
      uSlackr about 12 years
      @Sirex, thanks for the idea. I generally like to do these things myself
    • fixer1234
      fixer1234 about 9 years
      How satisfactory any solution will be depends on your quality requirements. If you are looking for the best possible result from your equipment, that may require cleaning each picture, positioning it perfectly on the glass, cropping accurately, doing all image adjustment after scanning, etc. If your requirements don't include perfection, scanning several at a time can work. However, it won't save as much time as you think. Positioning multiple pictures perfectly takes longer, and the post-processing adds time unless you have identical-sized pictures and can semi-automate the post-processing.
  • uSlackr
    uSlackr about 12 years
    Thanks - I updated my question to say I already have a scanner I'd like to make use of.