Scanning Large Amounts of Pictures?
ClintJCL asks: "My wife & I are involved in scanning every photo I've ever taken in my life. She can lay down 4 or 5 pictures into the flatbed scanner at once, thereby saving the scanning time which is the bottleneck. But then she has to split them with Photoshop, which is also somewhat time-consuming. I've searched on the net for hours for a piece of software that would automatically split these 'Batch image scans' into single images and it just doesn't seem to exist. There are plenty of pieces of software to split a single image arbitrarily into sections for the purpose of loading faster on an HTML page (which I disagree with anyway and is not what I'm looking for). But -nothing- that seems to do any sort of edge-detection to determine what pictures exist in a given 'scan batch'. I'm out of resources. I've nowhere else to go. Perhaps someone can clue me in on a piece of software that can do this for me."
Finding the image edges from her bulk scans is one of the more trivial operations you can do on an image. Grab a handy-dandy image library for your chosen format (pnglib, jpeg, whatever) and write a couple pages of code and you're done. GPL it and help others with the same problem.
11*43+456^2
I was asked just yesterday to find something very much like this (except for some text processing and databasing thrown in). I haven't found anything out of the box that fits (not that I was smart enough to do an ask slashdot on it), so I think that I may have to code my own in the next week. Are you willing to pay a little cash for a custom solution?
It's been quite a while since I scanned anything, but I remember that with whatever scanner I was using at the time, in Photoshop you would do file->acquire->twain and it would bring up the scanning program. This program scanned the image lightly as a preview, and then let you select however many "jobs" you wanted at once, so you could select 1 square as job 1, another as job 2, another as job 3. Then it would make one pass and generate an image for each job.
As I said, this was a while ago and I don't remember the scanner, but it was probably some UMAX. The name "Mira scanner" stands out in my mind as the scanning software. You scanner may have this capability also; poke around a bit.
rooooar
I have a higher end scanner (powerlook 3000) It allows you to do multiple scans in one pass.
ie you preview
you box all the pictures
you click scan
you can adjust each box color/exposure separate.
it scans each image as a separate file. Of course you have to preview each image which takes times.
You could write some software to do it. It might help to use a background matt of a consistant color though.
I think you really should consider scaning only images you care about and adjusting each one individually. If you really care about your images get a negative scanner. Scanning negatives is far far fat better than scanning prints.
Photoshop should be just fine for what you want to do.
There should be a pallete around that lets you create actions. You basically hit the record button and go through the steps you want to do. Map that to a keystroke and voila.
When selecting the picture, you could even used a fixed width box, so all of the pictures will have the same dimensions. For the action, you could have it copy what you've selected, create a new image and paste the selection into it. Then have it merge layers and auto-adjust the levels/contrast and then have it bring up the save dialog box.
All you're really left doing is scanning the set of pictures, clicking the mouse once (for the fixed width box), hitting the keystroke and then typing in the name of the file.
- The border around every image shows a high contrast against the scanner background (which is usually white). This shouldn't be too much of a problem, unless you take lots of pictures of very light things.
- Your photographs are rectangular. This may sound silly, but it's a lot easier to find a rectangle than some arbitrary n-gon.
- Your photographs are placed so that edges of the photograph run parallel to the bed (i.e. you put the pictures down squarely)
If (1), (2) and (3) hold, then implementing this shouldn't be too bad --- I would use this algorithm:- take a scan of the background of the scanner (i.e. hit the scan button with no pictures on the bed) and remember this background image
- for each image in the input set
- perform edge detection
- use a Hough transform to detect lines in the edge map
- calculate the difference image D. If B[k](i,j) is the value of the k color band at pixel (i,j) in the background image and F[k](i,j) is the value of the k color band at pixel (i,j), then D(i,j) = max(abs(F[r](i,j)-B[r](i,j)),abs(F[g](i,j)-B[g](i
, j)),abs(F[b](i,j)-B[b](i,j))
- divide the difference image and the input image into rectangular regions using the lines that were detected with the Hough transform. For each region, calculate the average difference; if this value is large enough (i.e. over ~ 8-16), then consider that region to be a picture, otherwise it's blank space.
Intel's OpenCV library (look it up at SourceForge) can do most of the "tough" stuff for you (i.e. the edge detection and the Hough Transform). Hope this helpsOf course there are ways to do this on Windows. But it's hard to believe that no one has yet implemented it the unix way. There should be a utility where you type "picsplit *.jpg", and you get a directory of split files, sequentially numbered.
Programmers are always looking for projects, this sounds like a relatively easy one.
ImageMagick comes with some command line utils that you can use to pull sections out of an image. Since you are scanning photos, I assume they are all the same size and have the same placement on the scanner. You could just write a script to grab 5 sections (or however many you are scanning) out of the image produced by the scanner. It won't automatically find the boundaries between each photo, but if you place them on the scanner carefully, you should be able to get consistent results.
The NetPBM package may have similar capabilities.
Need Free Juniper/NetScreen Support? JuniperForum