Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
1  
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 –  EBGreen Feb 17 '12 at 14:00
    
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. –  Sirex Feb 17 '12 at 14:13
    
I already have a scanner - an HP photosmart that is nice but have no such feature. So I'm looking for something "aftermarket". –  uSlackr Feb 17 '12 at 14:13
    
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. –  Sirex Feb 17 '12 at 14:22
    
@Sirex, thanks for the idea. I generally like to do these things myself –  uSlackr Feb 20 '12 at 16:39

2 Answers 2

up vote 1 down vote accepted

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.)

share|improve this answer

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 taht Photoshop is a great too to work with the images separately as well. Photoshop Elements sems to ahve a similar function and a lower cost Elements

There are sure to be many other solutions

share|improve this answer
    
Thanks - I updated my question to say I already have a scanner I'd like to make use of. –  uSlackr Feb 17 '12 at 14:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.