Go Back   The macosxhints Forums > OS X Help Requests > Applications



Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Old 11-01-2002, 07:35 PM   #21
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
Lightbulb No need!

Turns out that VueScan has the ability to save batch scans as single multipage TIFF files. However, you need to remove the "+" sign from the document name for it to respect this setting (otherwise it saves each scan separtely). VueScan is quite powerful, but it takes a while to get a hang of all the settings. It helps to read the manual ...
kerim is offline   Reply With Quote
Old 11-03-2002, 04:49 PM   #22
eravau
Triple-A Player
 
Join Date: Oct 2002
Location: Labadie, MO
Posts: 136
Cool. I use VueScan...but only for scanning single images. I never realized it could do this since I never had need of it and went looking for it. I guess that's just another reason that VueScan is worth the bucks to replace most any manufacturer-provided scanner drivers.
eravau is offline   Reply With Quote
Old 11-03-2002, 06:15 PM   #23
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
I should say that I have had some serious crashes using VueScan in this way.
kerim is offline   Reply With Quote
Old 11-10-2002, 09:57 AM   #24
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
Lightbulb What Works

OK. Here is what I finally ended up with that works without crashing.

Setup:

ibook (dual usb, 640MB, X 10.2.1)
Epson 1640SU Office Scanner (with ADF)
Vuescan
ImageMagick (installed via FINK)

(1) Following Vuescan's instructions for "Advanced Workflow" (in the help manual). The only difference here is that the document feeder setting requires you to set the "Raw Save With" setting (under the "files" tab) to "Preview" instead of "scan". This is because when using the document feeder Vuescan actually scans from preview.

Note: this is one of the many quirks of Vuescan which make it a very annoying program. However, the developer was helpful in answering questions. Also, the next step wouldn't be necessary if Vuescan was more stable in batch scanning to multi-page Tiffs, but I think this method actually produces better results than if I just used Vuescan's built-in filters.

I have already set Vuescan to save all the resulting tif files (named scan0001.tif, scan0002.tif, etc.) to a folder on my desktop. Note, these are raw Tiff files, so they are fairly large, a few MB each (usually about 3 for 8bit greyscale).

(2) I then open the Terminal and I "cd" to the folder with the scans. Then I type the following command:

Code:
nice +10 convert -gravity South -crop 1700x2200+0+0 -rotate "+90" 
-level 10000,1,50000 -unsharp 6x1+100+0.05 -adjoin *.tif pbm:convert.pbm 
; convert -compress zip -page 792x612 convert.pbm pdf:document.pdf
Note: there shouldn't be any returns, but I needed to fix the page-wrap.

That's it - I end up with beautiful PDF files. The terminal command takes a long time to run, so I usually do it at night when I am asleep. even with "nice +10" it still makes everything else run a little slower at times (like when Entourage is synchronizing IMAP folders in the background).

Here is what that command actually means:

"nice +10" - this tells the computer to make the following "convert" command friendlier to running processes. It makes the command a little slower, but all your other programs a little zippier.

"convert" - this is a command from ImageMagick, and all the other commands are settings for it.

"-gravity South -crop 1700x2200+0+0" This tells ImageMagick to crop 3 inches off the bottom of the page - turning a 14 inch scan into a 11 inch scan. The first part tells ImageMagic where to cut from, and the second part what the dimentions in "points" should be. It is a 200dpi scan, so 200 points equal 1 inch. 2200 = 11 inches.

"-rotate "+90"" This is pretty obvious. Skip if the scan isn't landscape.

"-level 10000,1,50000" This sets the black and white point for high contrast. It removes that fine mist of pixles which occur because a the white space isn't really white. These spots get accentuated when converting from greyscale to black and white and make the document very hard to read. There is also a "-contrast" command, but I find it doesn't work as well. Still, these settings may need to be altered for some documents, while "-contrast" is automatic.

"-unsharp 6x1+100+0.05" This is an "unsharp mask" filter, just like in Photoshop! It is the best way to sharpen the image up, even though it does seem to run very slowly. ImageMagick also has other similar filters: "-despeckle", "-noise", "-enhance", etc. But this is the best. You may need to adust the settings, but this works for me most of the time. The difference is small, but still noticable and makes for more readable print outs of the resulting scan.

"-adjoin *.tif pbm:convert.pbm" This tells it to take all the tiff files in the folder and convert them to a single multipage PBM document (Portable Bitmap Document). This is the best way I found to convert from an 8-bit to a 1-bit black and white document. THere is also the "-monocrhome" command, and the "type -bilevel" command, but they tend to not mix well with the other commands, resulting in a distorted image (especially because of the -crop command, I think). This does the conversion only when saving the file.

"convert -compress zip -page 792x612 convert.pbm pdf:document.pdf" I then have to run another "convert" command to convert the PBM document into a PDF document. This just adds Zip compression and sets the page size to landscape mode (so the PDF is properly aligned). I don't know if the Zip compression here actually does anything, but it doesn't seem to hurt either.

One advantage of this two-step process is with double-sided documents. In that case I scan each side to two different folders and I use "A Better Finder Rename" to rename one set 001,003,005, etc., and the other to 002,004,006, etc. Then I merge the folders before doing the "convert" command. Another advantage of this method is that if you screw up (producing missed or messed-up pages) you can simply replace or insert a single page before running "convert."

If anyone has any tips on how to speed up this process or improve it, they would be greatly appreciated. At the momemnt there is no "document management" for OSX that would allow one to easily scan from a document feeder to a multipage document. Hopefully someone is working on creating a "WorkingPapers" type program for OS X ...

Last edited by kerim; 11-10-2002 at 10:06 AM.
kerim is offline   Reply With Quote
Old 11-10-2002, 11:32 AM   #25
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
Thumbs up ImageMagick Improvements for Text Processing!

ImageMagick 5.2.2 will support "local adaptive thresholding" which will greatly improve document enhancing:

http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm

Can't wait!
kerim is offline   Reply With Quote
Old 11-10-2002, 07:00 PM   #26
eravau
Triple-A Player
 
Join Date: Oct 2002
Location: Labadie, MO
Posts: 136
Wow! You've really become an ImageMagick-ian (ImageMagician?)! I hope that I learn to use it that extensively some day.
eravau is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 05:38 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.